Javascript examples for RegExp:Match Phone Number
Phone number validation with Parentheses sign
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {//from w w w .ja va 2 s .c om console.log( !! "(123)4567890".match(/\(\d{3}\)\d{7}/g)); console.log( !! "123)4567890".match(/\(\d{3}\)\d{7}/g)); console.log( !! "1234567890".match(/\(\d{3}\)\d{7}/g)); }); </script> </head> <body> </body> </html>