aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/re/_parser.py
Commit message (Collapse)AuthorAge
* gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314)Serhiy Storchaka2025-05-03
| | | | | | | | \Z was an error inherited from PCRE 0.95. It was fixed in PCRE 2.0. In other engines, \Z means not “anchor at string end”, but “anchor before optional newline at string end”. \z means “anchor at string end” in most RE engines.
* Remove dead code in the RE parser (GH-122796)Serhiy Storchaka2024-08-07
|
* gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)Serhiy Storchaka2023-10-14
| | | | | | Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. The limit is increased to 2**32-1 (was 2**31-1).
* gh-106566: Optimize (?!) in regular expressions (GH-106567)Serhiy Storchaka2023-08-07
|
* gh-106510: Fix DEBUG output for atomic group (GH-106511)Serhiy Storchaka2023-07-08
|
* gh-105687: Remove deprecated objects from `re` module (#105688)Nikita Sobolev2023-06-14
|
* gh-91524: Speed up the regular expression substitution (#91525)Serhiy Storchaka2022-10-23
| | | | | | | | | Functions re.sub() and re.subn() and corresponding re.Pattern methods are now 2-3 times faster for replacement strings containing group references. Closes #91524 Primarily authored by serhiy-storchaka Serhiy Storchaka Minor-cleanups-by: Gregory P. Smith [Google] <greg@krypto.org>
* gh-92728: Restore re.template, but deprecate it (GH-93161)Miro Hrončok2022-05-25
| | | | | | Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)" This reverts commit b09184bf05b07b77c5ecfedd4daa846be3cbf0a9.
* gh-91760: More strict rules for numerical group references and group names ↵Serhiy Storchaka2022-05-08
| | | | | | | | in RE (GH-91792) Only sequence of ASCII digits is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore.
* gh-91760: Deprecate group names and numbers which will be invalid in future ↵Serhiy Storchaka2022-04-30
| | | | | | | | (GH-91794) Only sequence of ASCII digits will be accepted as a numerical reference. The group name in bytes patterns and replacement strings could only contain ASCII letters and digits and underscore.
* gh-91870: Remove unsupported SRE opcode CALL (GH-91872)Serhiy Storchaka2022-04-26
| | | | | | | It was initially added to support atomic groups, but that support was never fully implemented, and CALL was only left in the compiler, but not interpreter and parser. ATOMIC_GROUP is now used to support atomic groups.
* gh-91308: Simplify parsing inline flag "x" (verbose) (GH-91855)Serhiy Storchaka2022-04-23
|
* gh-91700: Validate the group number in conditional expression in RE (GH-91702)Serhiy Storchaka2022-04-22
| | | | | | In expression (?(group)...) an appropriate re.error is now raised if the group number refers to not defined group. Previously it raised RuntimeError: invalid SRE code.
* gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665)Serhiy Storchaka2022-04-22
| | | re.error is now raised instead of TypeError.
* bpo-47227: Suppress expression chaining for more RE parsing errors (GH-32333)Serhiy Storchaka2022-04-06
|
* bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)Serhiy Storchaka2022-04-06
| | | They were undocumented and never working.
* bpo-47152: Convert the re module into a package (GH-32177)Serhiy Storchaka2022-04-02
The sre_* modules are now deprecated.