summaryrefslogtreecommitdiffstats
path: root/Lib/sre_parse.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31690: Allow the inline flags "a", "L", and "u" to be used as group ↵Serhiy Storchaka2017-10-241-4/+20
| | | | flags for RE. (#3885)
* bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (#2016)Roy Williams2017-06-101-1/+1
| | | | Running our unit tests with `-bb` enabled triggered this failure.
* bpo-30375: Correct the stacklevel of regex compiling warnings. (#1595)Serhiy Storchaka2017-05-161-10/+11
| | | | | | Warnings emitted when compile a regular expression now always point to the line in the user code. Previously they could point into inners of the re module if emitted from inside of groups or conditionals.
* bpo-30340: Enhanced regular expressions optimization. (#1542)Serhiy Storchaka2017-05-141-35/+70
| | | | This increased the performance of matching some patterns up to 25 times.
* bpo-30298: Weaken the condition of deprecation warnings for inline ↵Serhiy Storchaka2017-05-101-7/+5
| | | | | | | | modifiers. (#1490) Now allowed several subsequential inline modifiers at the start of the pattern (e.g. '(?i)(?s)...'). In verbose mode whitespaces and comments now are allowed before and between inline modifiers (e.g. '(?x) (?i) (?s)...').
* Issue #25953: re.sub() now raises an error for invalid numerical groupSerhiy Storchaka2016-10-231-8/+10
| | | | | | | reference in replacement template even if the pattern is not found in the string. Error message for invalid group reference now includes the group index and the position of the reference. Based on patch by SilentGhost.
* Issue #22493: Warning message emitted by using inline flags in the middle ofSerhiy Storchaka2016-09-161-2/+7
| | | | | regular expression now contains a (truncated) regex pattern. Patch by Tim Graham.
* Issue #22493: Inline flags now should be used only at the start of theSerhiy Storchaka2016-09-111-0/+8
| | | | | regular expression. Deprecation warning is emitted if uses them in the middle of the regular expression.
* Issue #28070: Fixed parsing inline verbose flag in regular expressions.Serhiy Storchaka2016-09-101-0/+1
|
* Issue #433028: Added support of modifier spans in regular expressions.Serhiy Storchaka2016-09-091-30/+84
|
* Issue #27030: Unknown escapes consisting of ``'\'`` and ASCII letter inSerhiy Storchaka2016-06-111-44/+5
| | | | regular expressions now are errors.
* Issue #26475: Fixed debugging output for regular expressions with the (?x) flag.Serhiy Storchaka2016-03-061-3/+3
|
* Issue #25554: Got rid of circular references in regular expression parsing.Serhiy Storchaka2015-11-051-6/+6
|
* Issue #24580: Symbolic group references to open group in re patterns now areSerhiy Storchaka2015-07-181-0/+3
| | | | explicitly forbidden as well as numeric group references.
* Issue #14260: The groupindex attribute of regular expression pattern objectSerhiy Storchaka2015-03-291-1/+2
| | | | now is non-modifiable mapping.
* Issue #22364: Improved some re error messages using regex for hints.Serhiy Storchaka2015-03-251-115/+112
|
* Fixed using deprecated escaping in regular expression in _strptime.py ↵Serhiy Storchaka2015-03-241-1/+1
| | | | (issue23622).
* Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``Serhiy Storchaka2015-03-241-1/+13
| | | | | and ASCII letter now raise a deprecation warning and will be forbidden in Python 3.6.
* Issues #814253, #9179: Group references and conditional group references nowSerhiy Storchaka2015-02-211-9/+42
| | | | work in lookbehind assertions in regular expressions.
* Issue #21032: Deprecated the use of re.LOCALE flag with str patterns orSerhiy Storchaka2014-12-011-0/+10
| | | | re.ASCII. It was newer worked.
* merge 3.4 (#9179)Benjamin Peterson2014-11-301-24/+9
|\
| * backout 9fcf4008b626 (#9179) for further considerationBenjamin Peterson2014-11-301-24/+9
| |
* | Minor code clean up and improvements in the re module.Serhiy Storchaka2014-11-111-4/+4
| |
* | Fixed error position for the backslash at the end of regex pattern.Serhiy Storchaka2014-11-101-1/+2
| |
* | Fixed AttributeError when the regular expression starts from illegal escape.Serhiy Storchaka2014-11-101-0/+1
| |
* | Issue #22578: Added attributes to the re.error class.Serhiy Storchaka2014-11-101-59/+82
| |
* | Merge headsSerhiy Storchaka2014-11-101-2/+2
|\ \
| * | Issue #22823: Use set literals instead of creating a set from a listRaymond Hettinger2014-11-091-2/+2
| | |
* | | Issue #22434: Constants in sre_constants are now named constants (enum-like).Serhiy Storchaka2014-11-091-5/+4
|/ /
* | Issues #814253, #9179: Group references and conditional group references nowSerhiy Storchaka2014-11-071-9/+24
|\ \ | |/ | | | | work in lookbehind assertions in regular expressions.
| * Issues #814253, #9179: Group references and conditional group references nowSerhiy Storchaka2014-11-071-9/+24
| | | | | | | | work in lookbehind assertions in regular expressions.
* | Issue #19380: Optimized parsing of regular expressions.Serhiy Storchaka2014-10-101-149/+119
| |
* | Issue 1519638: Now unmatched groups are replaced with empty strings in re.sub()Serhiy Storchaka2014-10-101-5/+3
| | | | | | | | and re.subn().
* | Issue #22437: Number of capturing groups in regular expression is no longerSerhiy Storchaka2014-09-291-0/+10
| | | | | | | | limited by 100.
* | Issue #22362: Forbidden ambiguous octal escapes out of range 0-0o377 inSerhiy Storchaka2014-09-231-4/+16
|/ | | | regular expressions.
* Issue #22423: Fixed debugging output of the GROUPREF_EXISTS opcode in the reSerhiy Storchaka2014-09-211-16/+28
| | | | module.
* Issue #8343: Named group error msgs did not show the group name.Raymond Hettinger2014-06-231-3/+6
|
* Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-201-2/+0
|
* Issue #19365: Optimized the parsing of long replacement string in re.sub*()Serhiy Storchaka2013-10-231-44/+30
| | | | functions.
* Issue #18647: Correctly bound calculated min/max width of a subexpression.Serhiy Storchaka2013-08-191-4/+4
| | | | | Now max width is MAXREPEAT on 32- and 64-bit platforms when one of subexpressions is unbounded repetition.
* #17341: Include name in re error message about invalid group name.R David Murray2013-04-141-2/+3
| | | | Patch by Jason Michalski.
* Closes #14462: allow any valid Python identifier in sre group names, as ↵Georg Brandl2013-04-141-4/+16
| | | | documented.
* Issue #13169: The maximal repetition number in a regular expression has beenSerhiy Storchaka2013-02-161-2/+7
|\ | | | | | | | | increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on 64-bit).
| * Issue #13169: The maximal repetition number in a regular expression has beenSerhiy Storchaka2013-02-161-2/+7
| | | | | | | | | | increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on 64-bit).
* | #13899: merge with 3.2.Ezio Melotti2013-01-111-1/+1
|\ \ | |/
| * #13899: \A, \Z, and \B now correctly match the A, Z, and B literals when ↵Ezio Melotti2013-01-111-1/+1
| | | | | | | | used inside character classes (e.g. [A]). Patch by Matthew Barnett.
* | #12759: merge with 3.2.Ezio Melotti2012-11-031-1/+7
|\ \ | |/
| * #12759: sre_parse now raises a proper error when the name of the group is ↵Ezio Melotti2012-11-031-1/+7
| | | | | | | | missing. Initial patch by Serhiy Storchaka.
* | Issue #3665: \u and \U escapes are now supported in unicode regular expressions.Antoine Pitrou2012-06-231-17/+49
| | | | | | | | Patch by Serhiy Storchaka.
* | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-1/+1
|/ | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.