Why does [$\u20AC] match a dollar or euro sign?
Regexp Tutorial - Character Classes or Character Sets
According to that page?
4 replies to this topic
#1
Posted 18 February 2011 - 02:02 PM
|
|
|
#2
Posted 18 February 2011 - 07:12 PM
That's the unicode character.
#3
Posted 18 February 2011 - 10:41 PM
The Euro symbol is very hard to ensure representation of in an ASCII-like codepage, so the tutorial defaults to matching the Unicode codepoint of the Euro character, as it was very likely stored as one.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#4
Posted 19 February 2011 - 04:29 AM
\u is the escape sequence for a Unicode character. Unicode is a 24-bit character set that allows for a wider range of symbols than ASCII. The Euro sign would be a Unicode character since it's not found in ASCII or (to my knowledge) Extended ASCII, and is evidently represented by \u20AC.
Programming is a journey, not a destination.
#5
Posted 19 February 2011 - 05:49 PM
Quote
Unicode is a 24-bit character set
A nice review if it is of interest to you: Comparison of Unicode encodings - Wikipedia, the free encyclopedia
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









