最初のステップはすべて問題ありませんが、2 番目のステップで問題が発生しfind()
ます。加えて、matches() は常に を返しますfalse
が、その理由はわかりません。個別に、すべての正規表現は正常に機能します。エミュレーターの使用。タックス君。
String[] regexContent = {"node[\\s\\S]*?(<p>[\\s\\S]+</p>)",
"([\\s\\S]*?)</div>"};
Pattern p;
Matcher m;
for (String regex : regexContent){
p = Pattern.compile(regex);
m = p.matcher(result);
//if (m.matches()) // always false
result = "";
if (m.find()) // on 2nd step waits for so long time & don't find
result = m.group(m.groupCount());
m.reset();
}