A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/009029.html below:

[Python-Dev] one last SRE headache

[Python-Dev] one last SRE headache [Python-Dev] one last SRE headacheFredrik Lundh Fredrik Lundh" <effbot@telia.com
Thu, 31 Aug 2000 22:33:11 +0200
guido wrote:
> Suggestion:
> 
> If there are fewer than 3 digits, it's a group.
> 
> If there are exactly 3 digits and you have 100 or more groups, it's a
> group -- too bad, you lose octal number support.  Use \x. :-)
> 
> If there are exactly 3 digits and you have at most 99 groups, it's an
> octal escape.

I had to add one rule:

    If it starts with a zero, it's always an octal number.
    Up to two more octal digits are accepted after the
    leading zero.

but this still fails on this pattern:

    r'(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\119'

where the last part is supposed to be a reference to
group 11, followed by a literal '9'.

more ideas?

> (Can you even have more than 99 groups in SRE?)

yes -- the current limit is 100 groups.  but that's an
artificial limit, and it should be removed.

</F>




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