I'm attempting to search a string for a certain sequence. I have not done anything with re, and it is... a bit confusing.

I'm looking for this string:
<div class="indexcenter"> (there's a portion of text here using newlines and characters) <!-- end indexcenter -->

I am thinking something alone these lines:
re.findall('<div class=\"indexcenter\">.+<!-- end indexcenter -->',html)

suggestions?

Problem solved. I needed to .compile with the re.DOTALL parameter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.