Skip to content

Instantly share code, notes, and snippets.

@ashwinkumar2438
Last active August 31, 2020 18:12
Show Gist options
  • Save ashwinkumar2438/c0e37e5384c09ab07e37dc1a484ebbde to your computer and use it in GitHub Desktop.
Save ashwinkumar2438/c0e37e5384c09ab07e37dc1a484ebbde to your computer and use it in GitHub Desktop.
//Using two flags 'g' and 'm' together on a Regex.
var regex1= /^[0-9]{9,10}/gm; // /^[0-9]{9,10}/gm
var regex2= new RegExp("^[0-9]{9,10}","gm") // /^[0-9]{9,10}/gm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment