Question about a regular expression
Rob Hodges
s323140 at student.uq.edu.au
Wed Dec 22 07:32:37 EST 1999
Rob Hodges <s323140 at student.uq.edu.au> writes:
> Yoav I H Parish <parish at ikb.mavt.ethz.ch> writes:
>
> > i have a string which could look something like
> >
> > a(x,y)b(x)
> > or
> > c(x,y,z)b(x)a(x,y)
[...]
> I'd use a regexp (.*?) to grab the entire contents of each paren pair,
Aarghh! Of course, I meant r"\((.*?)\)" -- you need the real parens as
well as the grouping parens. Oops,
-Rob
More information about the Python-list
mailing list