regexp problem in Python

Ant antroy at gmail.com
Tue Aug 7 06:32:42 EDT 2007


On Aug 3, 10:41 pm, Ehsan <ehsan.khod... at gmail.com> wrote:
...
> what can I do? what's wrong whit this pattern? thanx for your comments

Nothing. There's something wrong with the code you are using the regex
with. Post it and we may be able to help. Like Lawrence has said, it's
likely to be that you are using m.group(1) with your match object
instead of m.group(0) - the former gets the first group (i.e.
everything between the first set of parens - in your case the wmv|3gp
expression), whereas the latter will return the entire match.

Post your actual code, not just the regex.

--
Ant...

http://antroy.blogspot.com/






More information about the Python-list mailing list