Python regex matching multiple lines

前端 未结 1 1730

I\'m trying to get the contents of a

    tag from a webpage in python. I used the following code:
    matchResult = re.search(r\'
相关标签:
1条回答
  • 2021-01-27 00:29

    Include the re.DOTALL option as well, that will allow the . character to match newlines.

    0 讨论(0)
提交回复
热议问题