question on pattern
Sean 'Shaleh' Perry
shalehperry at attbi.com
Fri Jun 7 10:41:28 EDT 2002
On 07-Jun-2002 Ulrich Pfisterer wrote:
> I want to do a pattern match on a string that spans multiple lines (c++
> style comments, re.match('(/\*.*?\*/)', filestring)
> If I use the re.findall(pattern, string) method it only finds those
> matches that are on a single line. If I use re.match(pattern, string,
> DOTALL) it spans multiple lines but only finds the first match.
> Any help on this one would be greatly appreciated.
>
match only matches once you can either use a loop or use I believe findall() or
something similar.
More information about the Python-list
mailing list