I have tried /^[^^]+$/
, it is not allowing ^
, but also not allowing some special characters like <>(
that I want to allow.
Is there any regex that only not allow just one sign (^
)?
I have tried /^[^^]+$/
, it is not allowing ^
, but also not allowing some special characters like <>(
that I want to allow.
Is there any regex that only not allow just one sign (^
)?
/\^/g
will match all instances of the "hat" character.
/[^^]/g
will match all characters that are not the "hat" character.
Using +$
looks for one or more matching at the end of the string.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions