summaryrefslogtreecommitdiffstats
path: root/Lib/re/_parser.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-105687: Remove deprecated objects from `re` module (#105688)Nikita Sobolev2023-06-141-2/+1
|
* gh-91524: Speed up the regular expression substitution (#91525)Serhiy Storchaka2022-10-231-29/+16
| | | | | | | | | 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-251-1/+2
| | | | | | 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-081-28/+12
| | | | | | | | 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-301-7/+34
| | | | | | | | (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-261-4/+0
| | | | | | | 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-231-16/+4
|
* gh-91700: Validate the group number in conditional expression in RE (GH-91702)Serhiy Storchaka2022-04-221-0/+10
| | | | | | 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-221-2/+2
| | | re.error is now raised instead of TypeError.
* bpo-47227: Suppress expression chaining for more RE parsing errors (GH-32333)Serhiy Storchaka2022-04-061-5/+5
|
* bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)Serhiy Storchaka2022-04-061-2/+1
| | | They were undocumented and never working.
* bpo-47152: Convert the re module into a package (GH-32177)Serhiy Storchaka2022-04-021-0/+1079
The sre_* modules are now deprecated.