I have a regexp that matches all ascii characters:
/^[\x00-\x7F]*$/
Now I need to exclude from this range the following characters: '
, "
. How do I do that?
You can use negative lookahead for disallowed chars:
/^((?!['"])[\x00-\x7F])*$/
RegEx Demo
(?!['"])
is negative lookahead to disallow single/double quotes in your input.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With