Created
August 31, 2020 18:18
-
-
Save ashwinkumar2438/72f36d7a8e99f27e873b7f485ae8ce5e to your computer and use it in GitHub Desktop.
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 regex=/\d/y; | |
regex.lastIndex=3; | |
regex.exec("0123")[0]; // returns '3' instead of '0' as the regex starts the search from the index 3 of string. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment