Skip to content

Instantly share code, notes, and snippets.

@DavidMellul
Created May 30, 2018 20:45
Show Gist options
  • Save DavidMellul/25e24d40f8dbcef3cdcb04621cf83bb8 to your computer and use it in GitHub Desktop.
Save DavidMellul/25e24d40f8dbcef3cdcb04621cf83bb8 to your computer and use it in GitHub Desktop.
const str = '123456789' ;
if ( /^\d{9}$/.test(str) )
console.log('1 -> 9, you got it');
// Prints : 1 -> 9, you got it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment