Blog
JavaScript – RegExp Testing with Global Flag Set
If you create a regular expression and set its global flag to true, it is important to note that if you want to test multiple strings against that RegExp using the test() function you will most-likely want to zero out the regular expression’s lastIndex property. Take the following code for Read more…