0
Pattern p = Pattern.compile(".*\\\"(.*)\\\".*");
Matcher m = p.matcher("\"Hi there\"! How are you");
if (m.find()) {
try {
String iGotMyMatchedString = m.group(0);
} catch (Exception e) {
e.printStackTrace();
}
}
上面的代碼將返回字符串裏面的雙引號是「你好」。 我怎樣才能獲得remaininig字符串「!怎麼是你」從正則表達式中獲得無與倫比的字符串(Android)