Can anyone help me with this regex? I need something which allow: 0-9 a-z A-Z spaces commas hyphens apostrophes and these other special characters: _@=.` plus at the same time set characters limit into it.
I've got this now but it's throwing invalid regular expression exception.
var regex = /^\s*([0-9a-zA-Z\s\,\-\(\)\'\_\@\~\&\*\=\.\`]{1,35}+)\s*$/;
return this.optional(element) || value.match(regex);
}, "Please enter a valid name" );
Thanks for any help!
{1,35}+Whats this expected to do? Either the one, or the other. Both together doesn't make a lot of sense.+which means one or more is pointless.+sign means so initially, thanks for the help! it works perfectly now :)