[DH]
>> It's a conflict between python's syntax for regex back references
>> and octal number literals. Probably wasn't noticed until way too
>> ate, and now it will never change.
[EMAIL PROTECTED]
> I suspect it comes from Perl, since Python's regular expression engine tries
> pretty hard to be
DH> It's a conflict between python's syntax for regex back references
DH> and octal number literals. Probably wasn't noticed until way too
DH> late, and now it will never change.
I suspect it comes from Perl, since Python's regular expression engine tries
pretty hard to be compatible
> It's a conflict between python's syntax for regex back
> references and
> octal number literals. Probably wasn't noticed until way
> too late, and
> now it will never change.
So "reasonable choice" is not a really good description of the
phenomenon.
--
http://mail.python.org/mailman/listinfo/
Fredrik Lundh wrote:
> Joerg Schuster wrote:
>
>
>>>if you want to know why 100 is a reasonable and non-random choice, I
>>>suggest checking the RE documentation for "99 groups" and the special
>>>meaning of group 0.
>>
>>I have read everything I found about Python regular expressions. But I
>>am
Joerg Schuster wrote:
> So what?
Search in http://docs.python.org/lib/re-syntax.html for "99" and read
the following sentence carefully.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
... solution
--
http://mail.python.org/mailman/listinfo/python-list
My first test program was far too naive. Evil things do happen. Simply
removing the code that restricts the number of capturing groups to 100
is not a solitution.
--
http://mail.python.org/mailman/listinfo/python-list
* "Iain King" <[EMAIL PROTECTED]> wrote:
> Ah, doh! Of course. Oh well then... still, doesn't python's RE
> engine support named groups? That would be cumbersome, but would allow
> you to go above 100...
The named groups are built on top of numbered captures. They are mapped by the
parser and
Fredrik Lundh wrote:
> Iain King wrote:
>
> > Anyway, back to the OP: in this specific case, the cap of 100 groups in
> > a RE seems random to me, so I think the rule applies.
>
> perhaps in the "indistinguishable from magic" sense.
>
> if you want to know why 100 is a reasonable and non-random ch
So what?
--
http://mail.python.org/mailman/listinfo/python-list
Joerg Schuster wrote:
> > if you want to know why 100 is a reasonable and non-random choice, I
> > suggest checking the RE documentation for "99 groups" and the special
> > meaning of group 0.
>
> I have read everything I found about Python regular expressions. But I
> am not able to understand wh
> if you want to know why 100 is a reasonable and non-random choice, I
> suggest checking the RE documentation for "99 groups" and the special
> meaning of group 0.
I have read everything I found about Python regular expressions. But I
am not able to understand what you mean. What is so special ab
Iain King wrote:
> Anyway, back to the OP: in this specific case, the cap of 100 groups in
> a RE seems random to me, so I think the rule applies.
perhaps in the "indistinguishable from magic" sense.
if you want to know why 100 is a reasonable and non-random choice, I
suggest checking the RE doc
Steven D'Aprano wrote:
> On Tue, 25 Oct 2005 06:30:35 -0700, Iain King wrote:
>
> >
> > Steven D'Aprano wrote:
> >> On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
> >>
> >> >
> >> > Fredrik Lundh wrote:
> >> >> Joerg Schuster wrote:
> >> >>
> >> >> > I just want to use more than 100 capturin
On Tue, 25 Oct 2005 06:30:35 -0700, Iain King wrote:
>
> Steven D'Aprano wrote:
>> On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
>>
>> >
>> > Fredrik Lundh wrote:
>> >> Joerg Schuster wrote:
>> >>
>> >> > I just want to use more than 100 capturing groups.
>> >>
>> >> define "more" (101, 20
Steven D'Aprano wrote:
> On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
>
> >
> > Fredrik Lundh wrote:
> >> Joerg Schuster wrote:
> >>
> >> > I just want to use more than 100 capturing groups.
> >>
> >> define "more" (101, 200, 1000, 10, ... ?)
> >>
> >>
> >
> > The Zero-One-Infinity Ru
You did not quite understand me. I will give you some details:
My program is a compiler for a certain type of linguistic grammars.
I.e. the user gives *grammar files* to my program. When the grammar
files have been compiled, they can be applied to strings (of a certain
language, e.g. English).
In
On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
>
> Fredrik Lundh wrote:
>> Joerg Schuster wrote:
>>
>> > I just want to use more than 100 capturing groups.
>>
>> define "more" (101, 200, 1000, 10, ... ?)
>>
>>
>
> The Zero-One-Infinity Rule:
>
> http://www.catb.org/~esr/jargon/html/Z
"Joerg Schuster" <[EMAIL PROTECTED]> writes:
>> but what is the reason for so much capturing groups? I
>> imagine that coding this and keeping code maintenable is a huge effort.
>
> User input is compiled to regular expressions. The user does not have
> to worry about those groups.
And what is t
Fredrik Lundh wrote:
> Joerg Schuster wrote:
>
> > I just want to use more than 100 capturing groups.
>
> define "more" (101, 200, 1000, 10, ... ?)
>
>
The Zero-One-Infinity Rule:
http://www.catb.org/~esr/jargon/html/Z/Zero-One-Infinity-Rule.html
Iain
--
http://mail.python.org/mailman/li
> The joys of open source. Just remember you have now
> made your program
> non-portable. Hope this isn't an issue.
Of course portability is an issue -- on the long run. But on the short
run I am really glad to be able to do a 1 second demo run on my
notebook instead of a 20 seconds demo run. And
On Tue, 25 Oct 2005 03:55:17 -0700, Joerg Schuster wrote:
> No limitation at all would be best. If a limitation is necessary, then
> the more capturing groups, the better. At the time being, I would be
> really happy about having the possibility to use 1 capturing
> groups.
Do you really thin
> but what is the reason for so much capturing groups? I
> imagine that coding this and keeping code maintenable is a huge effort.
User input is compiled to regular expressions. The user does not have
to worry about those groups.
--
http://mail.python.org/mailman/listinfo/python-list
Joerg Schuster wrote:
>>What happens if you up the limit to whatever you need?
>
>
> Good idea. I just tried this. Nothing evil seems to happen. This seems
> to be a solution. Thanks.
>
> Jörg
>
The joys of open source. Just remember you have now made your program
non-portable. Hope this isn't
"Joerg Schuster" <[EMAIL PROTECTED]> writes:
> No limitation at all would be best. If a limitation is necessary, then
> the more capturing groups, the better. At the time being, I would be
> really happy about having the possibility to use 1 capturing
> groups.
I'm sorry, I missed the beginni
No limitation at all would be best. If a limitation is necessary, then
the more capturing groups, the better. At the time being, I would be
really happy about having the possibility to use 1 capturing
groups.
Jörg
--
http://mail.python.org/mailman/listinfo/python-list
Joerg Schuster wrote:
> I just want to use more than 100 capturing groups.
define "more" (101, 200, 1000, 10, ... ?)
--
http://mail.python.org/mailman/listinfo/python-list
> What happens if you up the limit to whatever you need?
Good idea. I just tried this. Nothing evil seems to happen. This seems
to be a solution. Thanks.
Jörg
--
http://mail.python.org/mailman/listinfo/python-list
"Joerg Schuster" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Some people, when confronted with a problem, think "I know,
> I'll use regular expressions." Now they have two problems.
> --Jamie Zawinski
Thanks for the citation.
If my goal had been to redesign my program, I would
"Joerg Schuster" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello,
Python regular expressions must not have more than 100 capturing
groups.
Really ??
I have been waiting a long time now for Python to get rid of this
limitation.
Ahh - The "dark side" of Open Source:
If nobody
Joerg Schuster wrote:
> I just want to use more than 100 capturing groups. If someone told me
> that it is very unlikely for Python to get rid of the said limitation,
> I would recode part of my program in C++ using pcre.
It is very unlikely for Python to get rid of the said limitation.
-Peter
-
> Some people, when confronted with a problem, think "I know,
> I'll use regular expressions." Now they have two problems.
> --Jamie Zawinski
Thanks for the citation.
If my goal had been to redesign my program, I would not ask questions
about regular expressions. I do not have the time to redesig
Joerg> Or is there a way to circumvent [capturing groups limitation]?
Sure, submit a patch to SourceForge that removes the restriction.
I've never come anywhere close to creating regular expressions that need to
capture 100 groups even though I generate regular expressions from a
higher-level
Hello,
Python regular expressions must not have more than 100 capturing
groups. The source code responsible for this reads as follows:
# XXX: get rid of this limitation!
if p.pattern.groups > 100:
raise AssertionError(
"sorry, but this version only supports 100 named
34 matches
Mail list logo