gpt4 book ai didi

android - 索引附近的 Unicode 属性不正确

转载 作者:太空宇宙 更新时间:2023-11-03 11:49:55 24 4
gpt4 key购买 nike

我正在尝试在 android 应用程序中使用我的 java 后端方法(问题可能是后端使用的是 JAVA 1.7,而 android 应用程序是 JAVA 1.6)。方法是:

public static boolean isAlphabetCharacter(String letter) {
String pattern = "\\A\\pL+\\z";
return letter.matches(pattern);
}

它崩溃了:Incorrect Unicode property near index ...

最佳答案

你应该尝试 \p{L} 而不是 \pL :)

关于android - 索引附近的 Unicode 属性不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22665156/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com