I have the following test (formatted just like below):
<td scope="row" align="left">
My Class: TEST DATA<br>
Test Section: <br>
MY SECTION<br>
MY SECTION 2<br>
</td>
I'm attempting to get the text between "Test Section: and the after the MY SECTION
I've tried several attempts with different RegEx patterns and I'm not getting anywhere.
If I do:
(?<=Test)(.*?)(?=<br)
Then I get the correct response of:
' Section: '
But, if I do
(?<=Test)(.*?)(?=</td>)
I get no results. The results should be "MY SECTIon
MY SECTION 2
"
I've tried using RegEx Multiline as well with no results.
Any help would be appreciated.
If it matters I'm coding in Python 2.7.
If something is not clear, or you need more info, please let me know.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…