java中的eq代表什么_Java中的模式CANON_EQ字段和⽰例仅当两个字符规范相等时,Pattern类的CANON_EQ字段才匹配两个字符。当将此值⽤作compile()⽅法的标志值时,两个字符将被匹配,且仅当它们的完全规范分解相等时才匹配。
主题风格
规范分解是Unicode⽂本规范化形式之⼀
例⼦1import Matcher;
soup
sin30度是多少import Pattern;
public class CANON_EQ_Example {
public static void main( String args[] ) {
String regex = "b\u0307";
//编译正则表达式
Pattern pattern = pile(regex, Pattern.CANON_EQ);
//检索匹配器对象
Matcher matcher = pattern.matcher("\u1E03");
if(matcher.matches()) {
System.out.println("Match found");
} el {
System.out.println("Match not found");
}heir是什么意思
}应用题及答案
}
输出结果Match found
例⼦2import Matcher;
import Pattern;
四级各部分分值多少
public class CANON_EQ_Example {
public static void main( String args[] ) {
String regex = "a\u030A";
//编译正则表达式
Pattern pattern = pile(regex, Pattern.CANON_EQ);
coordinate//检索匹配器对象
String [] input = {"\u00E5", "a\u0311", "a\u0325", "a\u030A", "a\u1E03", "a\uFB03" };
for (String ele : input) {
Matcher matcher = pattern.matcher(ele);
if(matcher.matches()) {
System.out.println(ele+" is a match for "+regex);
bits
} el {
System.out.println(ele+" is not a match for "+regex); }
}
cctv news}
burstout
}
输出结果å is a match for a?
a? is not a match for a?
a? is not a match for a?
a? is a match for a?
a? is not a match for a?
a? is not a match for a?