正则表达式-Unicode属性参考和示例 [英] Regex - Unicode Properties Reference and Examples

查看:148
本文介绍了正则表达式-Unicode属性参考和示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对RegexBuddy提供的Regex Unicode属性感到迷失,我无法区分任何Number属性,而Math符号属性似乎只匹配+,但不匹配-*/,例如^.

I feel lost with the Regex Unicode Properties presented by RegexBuddy, I cannot distinguish between any of the Number properties and the Math symbol property only seems to match + but not -, *, /, ^ for instance.

在正则表达式Unicode属性上是否有示例文档/参考?

Is there any documentation / reference with examples on regular expressions Unicode properties?

推荐答案

可以在 http://www.unicode.org/Public/UNIDATA/PropList.txt .

每个字符的属性可以在 http://www.unicode.org中找到/Public/UNIDATA/UnicodeData.txt (1.2 MB).

The properties for each character can be found in http://www.unicode.org/Public/UNIDATA/UnicodeData.txt (1.2 MB).

就您而言,

  • +(加号)为 Sm
  • -(HYPHEN-MINUS)是 Pd
  • *(ASTERISK)为 Po
  • /(SOLIDUS)也是 Po
  • ^(环形重音)为 Sk .
  • + (PLUS SIGN) is Sm,
  • - (HYPHEN-MINUS) is Pd,
  • * (ASTERISK) is Po,
  • / (SOLIDUS) is also Po, and
  • ^ (CIRCUMFLEX ACCENT) is Sk.

最好将它们与[-+*/^]匹配.

这篇关于正则表达式-Unicode属性参考和示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆