summaryrefslogtreecommitdiffstats
path: root/Lib/re.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #433028: Added support of modifier spans in regular expressions.Serhiy Storchaka2016-09-091-1/+1
|
* Removed unused imports.Serhiy Storchaka2016-04-241-1/+0
|
* Issue #22364: Improved some re error messages using regex for hints.Serhiy Storchaka2015-03-251-1/+1
|
* Issues #814253, #9179: Group references and conditional group references nowSerhiy Storchaka2015-02-211-2/+3
| | | | work in lookbehind assertions in regular expressions.
* merge 3.4 (#9179)Benjamin Peterson2014-11-301-3/+2
|\
| * backout 9fcf4008b626 (#9179) for further considerationBenjamin Peterson2014-11-301-3/+2
| |
* | Minor code clean up and improvements in the re module.Serhiy Storchaka2014-11-111-1/+1
| |
* | Issues #814253, #9179: Group references and conditional group references nowSerhiy Storchaka2014-11-071-2/+3
|\ \ | |/ | | | | work in lookbehind assertions in regular expressions.
| * Issues #814253, #9179: Group references and conditional group references nowSerhiy Storchaka2014-11-071-2/+3
| | | | | | | | work in lookbehind assertions in regular expressions.
* | Fixed compile error in issue #22410. The _locale module is optional.Serhiy Storchaka2014-10-301-1/+6
|\ \ | |/
| * Fixed compile error in issue #22410. The _locale module is optional.Serhiy Storchaka2014-10-301-1/+6
| |
* | Issue #22410: Module level functions in the re module now cache compiledSerhiy Storchaka2014-10-301-2/+9
|\ \ | |/ | | | | locale-dependent regular expressions taking into account the locale.
| * Issue #22410: Module level functions in the re module now cache compiledSerhiy Storchaka2014-10-301-2/+9
| | | | | | | | locale-dependent regular expressions taking into account the locale.
* | Issue #22510: Get rid of little overhead of testing re.DEBUG flag.Serhiy Storchaka2014-09-291-7/+5
| |
* | Removed a code for suport Python version <2.2.Serhiy Storchaka2014-09-281-11/+12
|/
* Issue #20426: When passing the re.DEBUG flag, re.compile() displays the ↵Antoine Pitrou2014-02-031-7/+10
|\ | | | | | | debug output every time it is called, regardless of the compilation cache.
| * Issue #20426: When passing the re.DEBUG flag, re.compile() displays the ↵Antoine Pitrou2014-02-031-7/+10
| | | | | | | | debug output every time it is called, regardless of the compilation cache.
* | Issue #16203: Add re.fullmatch() function and regex.fullmatch() method,Serhiy Storchaka2013-11-231-11/+17
| | | | | | | | | | | | which anchor the pattern at both ends of the string to match. Original patch by Matthew Barnett.
* | Back out accidentally pushed changeset b51218966201.Georg Brandl2013-10-131-17/+11
| |
* | Add re.fullmatch() function and regex.fullmatch() method, which anchor theGeorg Brandl2013-10-131-11/+17
| | | | | | | | | | | | | | pattern at both ends of the string to match. Patch by Matthew Barnett. Closes #16203.
* | Remove import functools from re module. The re module imports functools but ↵Christian Heimes2013-10-131-1/+0
|/ | | | never uses it.
* Issue #16564: Fixed a performance regression relative to Python 3.1 in theSerhiy Storchaka2013-03-161-6/+24
|\ | | | | | | caching of compiled regular expressions.
| * Issue #16564: Fixed a performance regression relative to Python 3.1 in theSerhiy Storchaka2013-03-161-9/+25
| | | | | | | | caching of compiled regular expressions.
* | Set cache sizes to a power-of-twoRaymond Hettinger2013-02-171-2/+2
| |
* | #14236: merge with 3.2.Ezio Melotti2012-04-291-1/+1
|\ \ | |/
| * #14236: fix docs for \S.Ezio Melotti2012-04-291-1/+1
| |
* | #14236: merge with 3.2.Ezio Melotti2012-04-291-1/+4
|\ \ | |/
| * #14236: mention Unicode whitespace in \s documentation.Ezio Melotti2012-04-291-1/+4
| |
* | Merge with 3.2.Georg Brandl2012-03-101-3/+8
|\ \ | |/
| * Closes #14244: add info about capturing groups and maxsplit to the docstring ↵Georg Brandl2012-03-101-3/+8
| | | | | | | | of re.split().
* | Merge 3.2Florent Xicluna2011-10-281-1/+1
|\ \ | |/
| * Closes #13258: Use callable() built-in in the standard library.Florent Xicluna2011-10-281-1/+1
| |
* | Issue 13227: Option to make the lru_cache() type specific (suggested by ↵Raymond Hettinger2011-10-201-5/+2
| | | | | | | | Andrew Koenig).
* | #2650: re.escape() no longer escapes the "_".Ezio Melotti2011-04-101-3/+5
|/
* #2650: Merge with 3.1.Ezio Melotti2011-03-251-2/+1
|\
| * #2650: Refactor re.escape to use enumerate().Ezio Melotti2011-03-251-2/+1
| |
* | Adopt more descriptive attribute names as suggested on python-dev.Raymond Hettinger2010-09-041-2/+2
| |
* | Clean-up the cache patch for the re module.Raymond Hettinger2010-08-141-48/+7
| |
* | Reapply r83877.Antoine Pitrou2010-08-131-20/+12
| |
* | Revert r83877 in order to fix compilationAntoine Pitrou2010-08-091-12/+20
| |
* | reapply the revert made in r83875Senthil Kumaran2010-08-091-20/+12
| | | | | | | | | | | | | | | | | | Now the _collections is statically built, the build dependencies are in proper order and build works fine. Commit Log from r83874: Issue 9396. Apply functools.lru_cache in the place of the random flushing cache in the re module.
* | Revert 83784 adding functools.lru_cache() to the re module.Raymond Hettinger2010-08-091-12/+20
| | | | | | | | | | | | | | | | | | | | | | The problem is that the re module is imported by sysconfig and re needs functools which uses collections.OrderedDict() but the _collectionsmodule.c code is not yet constructed at this point in the build. The likely best solution will be to include _collections as part of the static build before the rest of the boot-strapping.
* | Issue 9396. Apply functools.lru_cache in the place of theRaymond Hettinger2010-08-091-20/+12
| | | | | | | | random flushing cache in the re module.
* | The default size of the re module's compiled regular expression cache hasGregory P. Smith2010-07-271-3/+36
|/ | | | | | | | been increased from 100 to 500 and the cache replacement policy has changed from simply clearing the entire cache on overflow to randomly forgetting 20% of the existing cached compiled regular expressions. This is a performance win for applications that use a lot of regular expressions and limits the impact of the performance hit anytime the cache is exceeded.
* Merged revisions 70090 via svnmerge fromGregory P. Smith2009-03-021-6/+6
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70090 | gregory.p.smith | 2009-03-01 21:13:57 -0800 (Sun, 01 Mar 2009) | 3 lines Adds an optional flags argument to re.split, re.sub and re.subn to be consistent with the other re module functions. ........
* Merged revisions 68116-68119,68121,68123-68127 via svnmerge fromBenjamin Peterson2009-01-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68116 | georg.brandl | 2009-01-01 05:46:51 -0600 (Thu, 01 Jan 2009) | 2 lines #4100: note that element children are not necessarily present on "start" events. ........ r68117 | georg.brandl | 2009-01-01 05:53:55 -0600 (Thu, 01 Jan 2009) | 2 lines #4156: make clear that "protocol" is to be replaced with the protocol name. ........ r68118 | georg.brandl | 2009-01-01 06:00:19 -0600 (Thu, 01 Jan 2009) | 2 lines #4185: clarify escape behavior of replacement strings. ........ r68119 | georg.brandl | 2009-01-01 06:09:40 -0600 (Thu, 01 Jan 2009) | 3 lines #4222: document dis.findlabels() and dis.findlinestarts() and put them into dis.__all__. ........ r68121 | georg.brandl | 2009-01-01 06:43:33 -0600 (Thu, 01 Jan 2009) | 2 lines Point to types module in new module deprecation notice. ........ r68123 | georg.brandl | 2009-01-01 06:52:29 -0600 (Thu, 01 Jan 2009) | 2 lines #4784: ... on three counts ... ........ r68124 | georg.brandl | 2009-01-01 06:53:19 -0600 (Thu, 01 Jan 2009) | 2 lines #4782: Fix markup error that hid load() and loads(). ........ r68125 | georg.brandl | 2009-01-01 07:02:09 -0600 (Thu, 01 Jan 2009) | 2 lines #4776: add data_files and package_dir arguments. ........ r68126 | georg.brandl | 2009-01-01 07:05:13 -0600 (Thu, 01 Jan 2009) | 2 lines Handlers are in the `logging.handlers` module. ........ r68127 | georg.brandl | 2009-01-01 07:14:49 -0600 (Thu, 01 Jan 2009) | 2 lines #4767: Use correct submodules for all MIME classes. ........
* Issue #3756: make re.escape() handle bytes as well as str.Guido van Rossum2008-09-101-15/+31
| | | | Patch by Andrew McNamara, reviewed and tweaked by myself.
* #2834: Change re module semantics, so that str and bytes mixing is forbidden,Antoine Pitrou2008-08-191-8/+23
| | | | | and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead.
* Rename copy_reg module to copyreg.Alexandre Vassalotti2008-05-111-2/+2
| | | | | | | | | | | | | | | Updated documentation. Merged revisions 63042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63042 | alexandre.vassalotti | 2008-05-11 04:25:28 -0400 (Sun, 11 May 2008) | 5 lines Added module stub for copy_reg renaming in 3.0. Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact. ........
* Merged revisions ↵Christian Heimes2008-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60568-60598,60600-60616 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r60568 | christian.heimes | 2008-02-04 19:48:38 +0100 (Mon, 04 Feb 2008) | 1 line Increase debugging to investige failing tests on some build bots ........ r60570 | christian.heimes | 2008-02-04 20:30:05 +0100 (Mon, 04 Feb 2008) | 1 line Small adjustments for test compact freelist test. It's no passing on Windows as well. ........ r60573 | amaury.forgeotdarc | 2008-02-04 21:53:14 +0100 (Mon, 04 Feb 2008) | 2 lines Correct quotes in NEWS file ........ r60575 | amaury.forgeotdarc | 2008-02-04 22:45:05 +0100 (Mon, 04 Feb 2008) | 13 lines #1750076: Debugger did not step on every iteration of a while statement. The mapping between bytecode offsets and source lines (lnotab) did not contain an entry for the beginning of the loop. Now it does, and the lnotab can be a bit larger: in particular, several statements on the same line generate several entries. However, this does not bother the settrace function, which will trigger only one 'line' event. The lnotab seems to be exactly the same as with python2.4. ........ r60584 | amaury.forgeotdarc | 2008-02-05 01:26:21 +0100 (Tue, 05 Feb 2008) | 3 lines Change r60575 broke test_compile: there is no need to emit co_lnotab item when both offsets are zeros. ........ r60587 | skip.montanaro | 2008-02-05 03:32:16 +0100 (Tue, 05 Feb 2008) | 1 line sync with most recent version from python-mode sf project ........ r60588 | lars.gustaebel | 2008-02-05 12:51:40 +0100 (Tue, 05 Feb 2008) | 5 lines Issue #2004: Use mode 0700 for temporary directories and default permissions for missing directories. (will backport to 2.5) ........ r60590 | georg.brandl | 2008-02-05 13:01:24 +0100 (Tue, 05 Feb 2008) | 2 lines Convert external links to internal links. Fixes #2010. ........ r60592 | marc-andre.lemburg | 2008-02-05 15:50:40 +0100 (Tue, 05 Feb 2008) | 3 lines Keep distutils Python 2.1 compatible (or even Python 2.4 in this case). ........ r60593 | andrew.kuchling | 2008-02-05 17:06:57 +0100 (Tue, 05 Feb 2008) | 5 lines Update PEP URL. (This code is duplicated between pydoc and DocXMLRPCServer; maybe it should be refactored as a GHOP project.) 2.5.2 backport candidate. ........ r60596 | guido.van.rossum | 2008-02-05 18:32:15 +0100 (Tue, 05 Feb 2008) | 2 lines In the experimental 'Scanner' feature, the group count was set wrong. ........ r60602 | facundo.batista | 2008-02-05 20:03:32 +0100 (Tue, 05 Feb 2008) | 3 lines Issue 1951. Converts wave test cases to unittest. ........ r60603 | georg.brandl | 2008-02-05 20:07:10 +0100 (Tue, 05 Feb 2008) | 2 lines Actually run the test. ........ r60604 | skip.montanaro | 2008-02-05 20:24:30 +0100 (Tue, 05 Feb 2008) | 2 lines correct object name ........ r60605 | georg.brandl | 2008-02-05 20:58:17 +0100 (Tue, 05 Feb 2008) | 7 lines * Use the same code to profile for test_profile and test_cprofile. * Convert both to unittest. * Use the same unit testing code. * Include the expected output in both test files. * Make it possible to regenerate the expected output by running the file as a script with an '-r' argument. ........ r60613 | raymond.hettinger | 2008-02-06 02:49:00 +0100 (Wed, 06 Feb 2008) | 1 line Sync-up with Py3k work. ........ r60614 | christian.heimes | 2008-02-06 13:44:34 +0100 (Wed, 06 Feb 2008) | 1 line Limit free list of method and builtin function objects to 256 entries each. ........ r60616 | christian.heimes | 2008-02-06 14:33:44 +0100 (Wed, 06 Feb 2008) | 7 lines Unified naming convention for free lists and their limits. All free lists in Object/ are named ``free_list``, the counter ``numfree`` and the upper limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block. The chances should make it easier to adjust Python for platforms with less memory, e.g. mobile phones. ........