Created
July 14, 2016 23:34
-
-
Save akirattii/6edd0708d4dd43d6685db2c20d67469a to your computer and use it in GitHub Desktop.
RegExp.exec search looping...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var reg = new RegExp(/e(.*?)e/g); | |
| var result; | |
| while((result = reg.exec(targetText)) !== null) { | |
| doSomethingWith(result); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment