ignore case only for a part of the regex?
MRAB
python at mrabarnett.plus.com
Sun Dec 30 13:04:02 EST 2012
On 2012-12-30 17:32, Roy Smith wrote:
> In article <mailman.1467.1356885520.29569.python-list at python.org>,
> Vlastimil Brom <vlastimil.brom at gmail.com> wrote:
>
>> you may check the new regex implementation for python
>> http://pypi.python.org/pypi/regex
>
> Wow, I wasn't aware of such an effort.
>
> At first reading, I'm amused by the concept of "strict fuzzy matching".
>
> Those of us with long memories will be confused by the name of the
> module, however. To me, "regex" is the old version, and "re" is the new
> (http://docs.python.org/release/1.5.1/lib/module-regex.html). Now, it's
> going to be "regex" is either the really old, or the really new version,
> and "re" is what came in between. I suppose the next iteration after
> this will be called "re" again :-)
>
> I'm not sure I like the fuzzy matching stuff. On the one hand, it can
> be useful. On the other hand, people already complain about how
> difficult it can be to read regexes. Once we add things like
> {i<=1,d<=1,s<=1,2i+2d+1s<=4} in the mix, it's going to be total line
> noise.
>
The request for fuzzy matching came after someone saw the TRE library:
http://laurikari.net/tre/
The difference is that the syntax is a bit clearer, IMHO. :-)
More information about the Python-list
mailing list