What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-15 17:23:05
Telephone Number Validator
const telephoneCheck = str => { const regExp = /^1?\s?(\(\d{3}\)|\d{3})(\s|-)?\d{3}(\s|-)?\d{4}$/gm return regExp.test(str) } telephoneCheck("27576227382"); /* Regular Expression Explanation Below !!! */ /* Expression : /^1?\s... Add solution