Use this rexeg
/\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/
- (123) 456 7899
- (123).456.7899
- (123)-456-7899
- 123-456-7899
- 123 456 7899
- 1234567899
supported
More Related Contents:
- What’s the best way to validate an email address in JavaScript?
- Including a hyphen in a regex character bracket?
- Regex pattern to match at least 1 number and 1 character in a string
- How to test valid UUID/GUID?
- Regular expression for URL validation (in JavaScript)
- Validating user’s UTF-8 name in Javascript
- Javascript regular expression to validate URL
- javascript regex for password containing at least 8 characters, 1 number, 1 upper and 1 lowercase [duplicate]
- Validate phone number using javascript
- Negative lookbehind equivalent in JavaScript
- Check whether an input string contains a number in javascript
- Validate decimal numbers in JavaScript – IsNumeric()
- Remove not alphanumeric characters from string
- How to write regex to validate dates?
- Javascript – Regex to validate date format [duplicate]
- Replacing the nth instance of a regex match in Javascript
- How to Call a JS function using OnClick event [duplicate]
- JavaScript Regex Global Match Groups
- How can I put [] (square brackets) in RegExp javascript?
- In a regular expression, match one thing or another, or both
- (*SKIP)(*FAIL) workaround in JavaScript RegExp
- What are non-word boundary in regex (\B), compared to word-boundary?
- What is the need for caret (^) and dollar symbol ($) in regular expression?
- Replacing accented characters with plain ascii ones [duplicate]
- How to insert space every 4 characters for IBAN registering?
- Regular Expression Pattern With A Variable
- RegEx Ignore Case
- Javascript – regex – word boundary (\b) issue
- How to properly escape characters in regexp
- How to loop all the elements that match the regex?