Skip to content

Instantly share code, notes, and snippets.

@YasirGaji
Created February 23, 2022 10:39
Show Gist options
  • Save YasirGaji/f6b13ccf9d01e49e2f6aabe7562d68de to your computer and use it in GitHub Desktop.
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
// 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