A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-June/025863.html below:

[Python-Dev] Behavior of matching backreferences

[Python-Dev] Behavior of matching backreferencesGustavo Niemeyer niemeyer@conectiva.com
Sun, 23 Jun 2002 20:30:06 -0300
Hello Tim!

> Wow, yesterday's drugs haven't worn off yet <wink>.  The details of this
> explanation were partly full of beans.  Let's consider a different regexp:
[...]

Thanks for explaining again, in a way I could understand. :-)

>     ^(a)?b\1$
> 
> Should that match
> 
>     b
>
> or not?  Python and Perl say "no" today, because \1 refers to a group that
> didn't match.  Ir remains unclear to me whether Gustavo is saying it should,
> but, if he is, that's too big a change, and
> 
>     ^(a?)b\1$
[...]

I still think it should, because otherwise the "^(a)?b\1$" can never be
used, and this expression will become "^((a)?)b\1$" if more than one
character is needed. But since nobody agrees with me, and both languages
are doing it that way, I give up. :-)

Could you please reject the patch at SF?

Thank you!

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4