Painting Blue Code
Simple, self-explanatory code snippets.
2015-02-17
RegEx - Specific string/character count in javascript
// This returns 1
'aasdf'.match(/a+/g).length;
// This returns 2
'aasdf'.match(/a/g).length;
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)