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
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