I want to modify this regex so that it accept all capital and non-capital alphabets, all the numbers and some special characters:
- , _, @, ., /, #, &, +.
How can I do this?
/^[ [email protected]/#&+-]*$/
You can also use the character class \w to replace
I forgot to mention. This should also accept whitespace.
You could use:
Note how this makes use of the character classes
EDIT:- Added \ to escape /