标签: regex html-parsing
String s = "<p>test with only p tag </p>";
输出应为test with only p tag
test with only p tag
String t = "<p>test with only p tag </p><p></p>";
输出应为test with only p tag <p></p>
test with only p tag <p></p>
答案 0 :(得分:0)
(?<=<p>).+(?=</p>)
应该有效