这些 Unicode 字符(代码点)在此正则表达式中意味着什么?

发布于 2024-07-06 06:34:13 字数 417 浏览 8 评论 0原文

我有以下正则表达式: 我弄清楚了大部分部分如下:

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°./ : ??

需要帮助理解验证表达式的最后部分:

u00C0-\u00FF°./

有人知道这是什么意思吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

苹果你个爱泡泡 2024-07-13 06:34:13

奇怪...根据 Windows 上的字符映射表,我会说“À 到 ÿ”

这些是 A、C、E、I、D、N、O、U、Y、德语的一些变体(重音、变音符号)夏普 S、...

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, ...

凉城已无爱 2024-07-13 06:34:13

\u00C0 - \u00FF 是带有重音符号的字母,但这不是全部。 而“°”只是度数字符。 然而,“./”可能应该是“\.” 允许句点字符。

\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.

送你一个梦 2024-07-13 06:34:13

您的问题标题错误,您需要 Unicode 代码点。 您可以在此处查看它们。

它们是《Latin1 Supplement》的后半部分,包括强调的人声和一些其他角色。 请参阅上面的链接。

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.

茶色山野 2024-07-13 06:34:13

分割原始字符串的结果看起来很奇怪,就好像您不明白 Unicode 转义序列是什么一样。 它应该看起来像:

\u0020
\u0027
\u002C
\u002D
\u0030-\u0039
\u0041-\u005A
\u005F
\u0061-\u007A
\u00C0-\u00FF
°
.
/

您可以在 Unicode 网站上查找这些代码点的含义:

最后三个字符的含义与所写内容完全相同:

  • 度数符号
  • 点/句号/句号正
  • 斜杠

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:

The last three characters mean exactly what is written:

  • degree sign
  • dot/period/full stop
  • forward slash
半衾梦 2024-07-13 06:34:13

它看起来是表 ASCII-II 中最后 2 列中显示的字符范围,链接为 扩展 ASCII 图表

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文