当然,对于正则表达式来说,英语是很容易理解的,因为它最初是用于/用于开发的:
正则表达式能理解这个字符集吗?
法语进入一些我不确定如何匹配的重音字符 - 即 è 和 e 是否都被正则表达式视为单词字符?
Les expressions régulières peuvent comprendre ce jeu de caractères?
日语不包含我所知道的正则表达式单词字符来匹配.
正规表达は、この文字を理解でき、设定?
解决方案简答:是的.
更具体地说,它取决于您的正则表达式引擎是否支持 unicode 匹配(如此处所述).p>
这样的匹配会让你的正则表达式变得非常复杂,所以我推荐阅读 this unicode正则表达式教程(另请注意,unicode 实现本身可能非常混乱,因此您也可以从阅读 Joel Spolsky 的 中受益文章 关于字符集的内部工作).
English, of course, is a no-brainer for regex because that's what it was originally developed in/for:
Can regular expressions understand this character set?
French gets into some accented characters which I'm unsure how to match against - i.e. are è and e both considered word characters by regex?
Les expressions régulières peuvent comprendre ce jeu de caractères?
Japanese doesn't contain what I know as regex word characters to match against.
正規表現は、この文字を理解でき、設定?
解决方案
Short answer: yes.
More specifically it depends on your regex engine supporting unicode matches (as described here).
Such matches can complicate your regular expressions enormously, so I can recommend reading this unicode regex tutorial (also note that unicode implementations themselves can be quite a mess so you might also benefit from reading Joel Spolsky's article about the inner workings of character sets).
更多推荐
正则表达式可以与不同的语言一起使用吗?
发布评论