javascript 'new RegEx()'
I have the following regular expression for validating email addresses
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@
((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])
|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
I would like to use the expression with the javascript 'new RegEx("Insert Regex")' notation. However, I am struggling to format the
expression properly when trying to put it inside the quotations.
Can anyone show me how the regexp should look to work with the new RegExp notation?
Thanks in advance
|