I'm trying to do a regex that allows all upper&lower case letters, digits and special characters:
% ' ` ( ) -& . / @ * , ! © ® ™
My regex:
/^[A-Za-z0-9%'`()-&./@*,!©®™\s]*$/
However, it returns invalid regex. Please help.
I'm trying to do a regex that allows all upper&lower case letters, digits and special characters:
% ' ` ( ) -& . / @ * , ! © ® ™
My regex:
/^[A-Za-z0-9%'`()-&./@*,!©®™\s]*$/
However, it returns invalid regex. Please help.
You just need to escape the dash and the slash
^[A-Za-z0-9%'`()\-&.\/@*,!©®™\s]*$
You can test your regex here