Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js exec iterate all matches

var reg = /e(.*?)e/g;
var result;
while((result = reg.exec(targetText)) !== null) {
    doSomethingWith(result);
}
 
PREVIOUS NEXT
Tagged: #js #exec #iterate #matches
ADD COMMENT
Topic
Name
3+1 =