I have an email form.
I need to allow, but not require, any leading and trailing whitespace.
Right now I have /^\s*[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}\s*$/i
The problem with that, is that requires at least one leading and trailing whitespace.
Any ideas?
You just needed some paren: