On Jun 27, 2009, at 3:28 AM, Virtual Buddha wrote:

Hello all,

I am having some difficulties with the non-capturing grouping in
python regular expression module.

Even the code from the online documentation (http://docs.python.org/
howto/regex.html#non-capturing-and-named-groups) does not seem to
work.

...

Notice that you are calling .group() on the match object instead of .groups(). Without any arguments, .group() is equivalent to .group(0), which means "return the entire matching string."

http://docs.python.org/library/re.html#re.MatchObject.group

-Miles

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to