2 Jul
2000
2 Jul
'00
4:38 p.m.
Fredrik Lundh wrote:
...
- add a new primitive to SRE: (?P#n), where n is a small integer. this primitive sets the match object's "index" variable to n when the engine stumbles upon it.
How about an interned string instead?
- given a list of "phrases", combine them into a single regular expression like this:
(?:phrase1(?P#1))|(?:phrase2(?P#2))|...
Will sre do anything about optimizing common prefixes and so forth? Overall, I like your proposal. -- Paul Prescod - Not encumbered by corporate consensus The calculus and the rich body of mathematical analysis to which it gave rise made modern science possible, but it was the algorithm that made the modern world possible. - The Advent of the Algorithm (pending), by David Berlinski