如何通过正则表达式或者jsoup将19040172b-1、 SQL Server开发 、郑尚 、3-5,7-14(周) 、东区综合楼D-101 提取出来?,
<p id="AE9D7F630640426F8457A661607D2B8E-5-2" style="display: none;" class="kbcontent">
19040172b-1
<br>SQL Server开发
<br>
<font title="老师">郑尚</font>
<br>
<font title="周次(节次)">3-5,7-14(周)</font>
<br>
<font title="教室">东区综合楼D-101</font>
<br>
</p>
已尝试下列办法均失败
1. Pattern pattern = Pattern.compile(">(.*?)<br>");
2. Elements msg = doc.select(":matchesOwn([>.*?<br>])");
Withdraw $1,$2,$3,$4,$5
Output:
19040172b-1 SQL Server开发 郑尚 3-5,7-14(周) 东区综合楼D-101
I don’t know if it meets the poster’s needs?
If the poster’s format is fixed, just parse it as above
HTML
会比较好一些,不需要REGEX
.My needs are roughly like this