Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why Using .* in Regular Expressions Is Almost Never What You Actually Want. Parent comment
strasse = straße
or treating combining characters the same as their single character equivalents:
ñ = ñ
(That's LATIN SMALL LETTER N WITH TILDE and LATIN SMALL LETTER N followed by COMBINING TILDE)
A surprising number of languages (mostly everything but Perl) won't handle advanced uses like this.
The good news is that the next version of the stdlib regex module is being developed independently:
https://pypi.python.org/pypi/regex
Simply "pip install regex" and:
>>> regex.match(r"(?iV1)strasse", "stra\N{LATIN SMALL LETTER SHARP S}e").span() (0, 6) >>> regex.match(r"(?iV1)stra\N{LATIN SMALL LETTER SHARP S}e", "STRASSE").span() (0, 7)
There are no comments on this comment yet.
strasse = straße
or treating combining characters the same as their single character equivalents:
ñ = ñ
(That's LATIN SMALL LETTER N WITH TILDE and LATIN SMALL LETTER N followed by COMBINING TILDE)
A surprising number of languages (mostly everything but Perl) won't handle advanced uses like this.
The good news is that the next version of the stdlib regex module is being developed independently:
https://pypi.python.org/pypi/regex
Simply "pip install regex" and: