开发者

Detecting High Surrogates in a String using Regular Expressions

开发者 https://www.devze.com 2023-03-24 09:22 出处:网络
I want to check whether a String contains any High Surrogates. In Java I would use开发者_运维知识库 Character.isHighSurrogate(c) and this works.

I want to check whether a String contains any High Surrogates. In Java I would use开发者_运维知识库 Character.isHighSurrogate(c) and this works.

In regex (using the implementation provided by Android 2.3.3 SDK), I was expecting this to work:

[\uD800-\uDBFF]

but it doesn't.

I am using the char:

0

精彩评论

暂无评论...
验证码 换一张
取 消