Reputation: 1381
I have the following regex that checks for characters not in the character class:
[^\w+\-:\.\(\)\"\*\?\&\|\!\{\}\[\]\^~\\@\#\/\$\%\'\= ]
I'm expecting that it doesn't match the dash '-' on the following string, however it is:
SEPCO−SEPA50PT−S−TFA−ALC18−PZ4
Upvotes: 0
Views: 105
Reputation: 32202
The −
in this:
SEPCO−SEPA50PT−S−TFA−ALC18−PZ4
is not the same character as the -
in your regex. It is in fact the Unicode MINUS-SIGN rather than the Unicode HYPHEN-MINUS.
Here are the two next to each other showing they're different:
−
-
Upvotes: 4