Created
February 23, 2022 10:39
-
-
Save YasirGaji/f6b13ccf9d01e49e2f6aabe7562d68de to your computer and use it in GitHub Desktop.
This script shows how the wild skip "*" flag functions on a regular expression for the "Regular Expressions in Javascript" article by Yasir Gaji
This file contains 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
// THE WILD SKIP FLAG DEMONSTRATION | |
const wildSkipFlagStatement = /G*i/; // declaring the regular expression | |
const thePassingStatement = 'G33167893hfaskj$&.i'; // passing multiple characters inplace of the flag | |
const theResult = thePassingStatement.match(wildSkipFlagStatement); //valuating... | |
console.log(theResult); //logging result. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment