> group != groups
>
> match.group() or match.group(0) gives you a special group that comprises the
> whole match. Regular capturing groups start at index 1, and only those are
> returned by match.groups():
>
> >> re.match("(?:[abc])+", "abc").group() # one group
> 'abc'
> >>> re.match("(?:[abc])+"
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.
>
> As
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 t
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.
As per the docs given in the link above this