A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-January/147277.html below:

[Python-Dev] re performance

[Python-Dev] re performance [Python-Dev] re performanceGreg Ewing greg.ewing at canterbury.ac.nz
Sun Jan 29 16:38:22 EST 2017
Armin Rigo wrote:

> The theoretical kind of regexp is about giving a "yes/no" answer,
> whereas the concrete "re" or "regexp" modules gives a match object,
> which lets you ask for the subgroups' location, for example.
> 
> Another issue is that the theoretical engine has no notion of
> greedy/non-greedy matching.

These things aren't part of the classical theory of REs that is
usually taught, but it should be possible to do them in linear time.
They can be done for context-free languages using e.g. an LALR parser,
and regular languages are a subset of context-free languages.

-- 
Greg
More information about the Python-Dev mailing list

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