Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 1
    In your regex, Instead of ., use [\s\S] because . does not match newlines Commented Feb 4, 2018 at 3:18
  • @Gurman result = re.search(r"<test1[\s\S]*?<\/test1>", escaped_raw_data) still I get a result of None Commented Feb 4, 2018 at 3:19
  • 1
    <test1[\s\S]*?<\/test1> Commented Feb 4, 2018 at 3:21
  • 1
    Yes. But, I am not proficient in Python. Was just trying to help you with the regex. Let python experts also see your question and attempt answers Commented Feb 4, 2018 at 3:26
  • 1
    Try result = re.search(r"<test1>.*<\/test1>", escaped_raw_data, re.DOTALL). Commented Feb 4, 2018 at 3:43