Here is the case: I want to find the elements which match the regex...
targetText = \"SomeT1extSomeT2extSomeT3extSomeT4extSomeT5extSomeT6ext\"
var reg = /e(.*?)e/g; var result; while((result = reg.exec(targetText)) !== null) { doSomethingWith(result); }