Commit Graph

157 Commits

Author SHA1 Message Date
Serhiy Storchaka a25875cfd0 Fixed re tests incorrectly ported from 2.x to 3.x. 2014-09-14 15:56:27 +03:00
Serhiy Storchaka 429b59ec69 Issue #20998: Fixed re.fullmatch() of repeated single character pattern
with ignore case.  Original patch by Matthew Barnett.
2014-05-14 21:48:17 +03:00
Serhiy Storchaka a537eb45fd Issue #20283: RE pattern methods now accept the string keyword parameters
as documented.  The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 11:36:15 +02:00
Serhiy Storchaka ccdf352370 Issue #20283: RE pattern methods now accept the string keyword parameters
as documented.  The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 11:28:32 +02:00
Antoine Pitrou c49672f25e Issue #20426: When passing the re.DEBUG flag, re.compile() displays the debug output every time it is called, regardless of the compilation cache. 2014-02-03 21:01:35 +01:00
Antoine Pitrou d2cc743ca4 Issue #20426: When passing the re.DEBUG flag, re.compile() displays the debug output every time it is called, regardless of the compilation cache. 2014-02-03 20:59:59 +01:00
Serhiy Storchaka 32eddc1bbc Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,
which anchor the pattern at both ends of the string to match.

Original patch by Matthew Barnett.
2013-11-23 23:20:30 +02:00
Serhiy Storchaka 5c24d0e504 Issue #13592: Improved the repr for regular expression pattern objects.
Based on patch by Hugo Lopes Tavares.
2013-11-23 22:42:43 +02:00
Serhiy Storchaka 9eabac68a3 Issue #18685: Restore re performance to pre-PEP 393 levels. 2013-10-26 10:45:48 +03:00
Antoine Pitrou 79aa68dfc1 Issue #19387: explain and test the sre overlap table 2013-10-25 21:36:10 +02:00
Serhiy Storchaka 8b150ecfc9 Issue #19327: Fixed the working of regular expressions with too big charset. 2013-10-24 22:04:37 +03:00
Serhiy Storchaka be80fc9a84 Issue #19327: Fixed the working of regular expressions with too big charset. 2013-10-24 22:02:58 +03:00
Serhiy Storchaka 36af10c1f7 Issue #17087: Improved the repr for regular expression match objects. 2013-10-20 13:13:31 +03:00
Serhiy Storchaka 25324971fb Issue #18468: The re.split, re.findall, and re.sub functions and the group()
and groups() methods of match object now always return a string or a bytes
object.
2013-10-16 12:46:28 +03:00
Georg Brandl daa1fa991c Back out accidentally pushed changeset b51218966201. 2013-10-13 09:32:59 +02:00
Georg Brandl 4300019e1a Add re.fullmatch() function and regex.fullmatch() method, which anchor the
pattern at both ends of the string to match.

Patch by Matthew Barnett.
Closes #16203.
2013-10-13 09:18:45 +02:00
Serhiy Storchaka 98985a1980 Issue #2537: Remove breaked check which prevented valid regular expressions.
Patch by Meador Inge.

See also issue #18647.
2013-08-19 23:18:23 +03:00
Serhiy Storchaka 1f35ae0a3c Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:18:38 +03:00
R David Murray 26dfaac9ac #17341: Include name in re error message about invalid group name.
Patch by Jason Michalski.
2013-04-14 13:00:54 -04:00
Georg Brandl 1d472b74cb Closes #14462: allow any valid Python identifier in sre group names, as documented. 2013-04-14 11:40:00 +02:00
Ezio Melotti eadece2865 #12749: add a test for non-BMP ranges in character classes. 2013-02-23 08:40:07 +02:00
Serhiy Storchaka b0c75a7dec Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat.  Patch by Matthew Barnett.
2013-02-16 21:25:05 +02:00
Serhiy Storchaka fa46816915 Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat.  Patch by Matthew Barnett.
2013-02-16 21:23:53 +02:00
Serhiy Storchaka a0eb809995 Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
2013-02-16 16:54:33 +02:00
Serhiy Storchaka 70ca0210e8 Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
2013-02-16 16:47:47 +02:00
Ezio Melotti adfbb8e8ec #13899: merge with 3.2. 2013-01-11 08:43:53 +02:00
Ezio Melotti fe8e6e7414 #13899: \A, \Z, and \B now correctly match the A, Z, and B literals when used inside character classes (e.g. [A]). Patch by Matthew Barnett. 2013-01-11 08:32:01 +02:00
Serhiy Storchaka c1b59d4552 Issue #16688: Fix backreferences did make case-insensitive regex fail on non-ASCII strings.
Patch by Matthew Barnett.
2012-12-29 23:38:48 +02:00
Antoine Pitrou 56a2ae27e3 Fix test splitting in previous commit. 2012-12-03 21:09:08 +01:00
Antoine Pitrou 86067c2e17 Fix test splitting in previous commit. 2012-12-03 21:08:43 +01:00
Antoine Pitrou b33941ab02 Split the bigmem re test in two separate tests with different memory requirements. 2012-12-03 20:55:56 +01:00
Antoine Pitrou 1f1888ec1e Split the bigmem re test in two separate tests with different memory requirements. 2012-12-03 20:53:12 +01:00
Antoine Pitrou 9a2b26748b Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
2012-12-02 12:54:28 +01:00
Antoine Pitrou 43fb54cd4f Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
2012-12-02 12:52:36 +01:00
Antoine Pitrou a34412a992 Merge test from issue #1160. 2012-11-20 22:35:53 +01:00
Antoine Pitrou 39bdad813a Issue #1160: Fix compiling large regular expressions on UCS2 builds.
Patch by Serhiy Storchaka.
2012-11-20 22:30:42 +01:00
Ezio Melotti 68600aff3a #12759: merge with 3.2. 2012-11-03 20:33:38 +02:00
Ezio Melotti 0941d9fc64 #12759: sre_parse now raises a proper error when the name of the group is missing. Initial patch by Serhiy Storchaka. 2012-11-03 20:33:08 +02:00
Antoine Pitrou 463badf06c Issue #3665: \u and \U escapes are now supported in unicode regular expressions.
Patch by Serhiy Storchaka.
2012-06-23 13:29:19 +02:00
Sean Reifschneider 7b3c975aaf closes #14259 re.finditer() now takes keyword arguments: pos, endpos.
Contrary to the documentation, finditer() did not take pos and endpos
keyword arguments.
2012-03-12 18:22:38 -06:00
Ezio Melotti cc50ba26bd #14179: merge with 3.2. 2012-03-13 01:33:30 +02:00
Ezio Melotti df723e1e5e #14179: add tests for re.compile. Patch by Florian Mladitsch. 2012-03-13 01:29:48 +02:00
Benjamin Peterson 33d21a24fa merge 3.2 (#14212) 2012-03-07 14:59:13 -06:00
Benjamin Peterson e48944b69c keep the buffer object around while we're using it (closes #14212) 2012-03-07 14:50:25 -06:00
Ezio Melotti 0b8123d8ae #10713: merge with 3.2. 2012-02-29 11:49:45 +02:00
Ezio Melotti 5a045b9f54 #10713: Improve documentation for \b and \B and add a few tests. Initial patch and tests by Martin Pool. 2012-02-29 11:48:44 +02:00
Martin v. Löwis d63a3b8beb Implement PEP 393. 2011-09-28 07:41:54 +02:00
Ezio Melotti 88fdeb45ef #2650: re.escape() no longer escapes the "_". 2011-04-10 12:59:16 +03:00
Ezio Melotti 213eb96902 #2650: Merge with 3.1. 2011-03-25 14:25:36 +02:00
Ezio Melotti 7b9e97b487 #2650: Add tests with non-ascii chars for re.escape. 2011-03-25 14:09:33 +02:00