What do these Unicode characters (codepoints) mean in this regex?
-
06-07-2019 - |
Question
I have the following regular expression : I figured out most of the part which is as follows :
ValidationExpression="^[\u0020\u0027\u002C\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00C0-\u00FF°./]{1,256}$" u0020 : SPACE u0027 : APOSTROPHE u002C : COMMA u002D : HYPHEN / MINUS u0030-\u0039\ : 0-9 u0041-\u005A : A - Z u005F : UNDERSCORE u0061-\u007A\ : a - z u00C0-\u00FF°./ : ??
Need help in understanding the final part of the validation expression :
u00C0-\u00FF°./
Anyone has any idea what does this mean?
Solution
weird... according to the character map on Windows I'd say "À to ÿ"
Those are some variations (accents, cedillas) on A, C, E, I, D, N, O, U, Y, the german Sharp s, ...
OTHER TIPS
\u00C0 - \u00FF are letters with accents on them, though that isn't all of them. And "°" is just the degree character. However, "./" should probably be "\." to permit period characters.
Your question is mistitled, you want help with Unicode codepoints. You can check them, for instance, here.
They are the second half of Latin1 Supplement, including accentuated vocals and some other characters. See the above links.
Using http://rishida.net/scripts/uniview/conversion.php I got: ',-0-9A-Z_a-zÀ-ÿ
Your result of splitting the original string looks weird, as if you hadn't understood what a Unicode escape sequence is. It should rather look like:
\u0020
\u0027
\u002C
\u002D
\u0030-\u0039
\u0041-\u005A
\u005F
\u0061-\u007A
\u00C0-\u00FF
°
.
/
You can look up the meaning of these code points at the Unicode web site:
- https://www.unicode.org/charts/PDF/U0000.pdf (Basic Latin)
- https://www.unicode.org/charts/PDF/U0080.pdf (Latin-1 Supplement)
- https://www.unicode.org/charts/PDF/U1F600.pdf (Emoticons)
The last three characters mean exactly what is written:
- degree sign
- dot/period/full stop
- forward slash
It looks to be the range of characters presented in the last 2 columns in TABLE ASCII-II at the following link to The Extended ASCII Chart