On 01/05/16 17:49, bruce wrote: > Hi. I have a chunk of text code, which has multiple lines.
> s=''' > <td valign="top" colspan="1"><b><a href="#" > id='CourseId10795788|ACCT2081|002_005_006' style="font-weight:bold;" > onclick='ShowSeats(this);return false;' alt="Click for Class Availability" > title="Click for Class Availability">ACCT2081</a></b></td>''' That looks like HTML. regex won't work reliably on HTML. You would be better using an HTML parser like BeautifulSoup or even the standard library's html.parser(Python v3). That will give more precise and reliable results for only a little more effort. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor