System.out.println("\\\\");
Matcher matcher = Pattern.compile("\\\\").matcher("aa\\bb\\cc\\dd");
int i =1;
while (i<2){
boolean b = matcher.find();
i++;
}
System.out.println(matcher.start());
Java匹配反斜杠java中用四个\\ 代表一个匹配的反斜杠 System.out.println("\\\\"); Matcher matcher = Pattern.compile("\\\\").matcher("aa\\bb\\cc\\dd"); int i =1; while (i<2){ boolean b = matcher.find(); i++; }