lp:~pythonregexp2.7/python/issue2636-22
The current implementation of the Python Regular Expression Engine does not allow an expression to be found or split if the length of the Regular Expression match is of zero-length. Rather than splitting the given string as expected, it simply returns the original string in a single-element array, rather than an array containing each character as an element of the output list, as well as an empty string to represent the "first" and "last" characters of a string. For example:
>>> re.split(r'\b', 'a b')
['a b']
When one would expect this to return the list [ '', 'a', ' ', 'b', '' ]. Because some existing python code may expect the single-element unsplit list as a result of a Zero-Width expression, it is recommended that, at least initially, we provide a flag, re.ZEROWIDTH and re.Z as well as an In-Line flag (?z) to enable this behaviour. It may also be possible to add a 'from __future__ import ZeroWidthRegula
- Get this branch:
- bzr branch lp:~pythonregexp2.7/python/issue2636-22
Branch merges
Branch information
Recent revisions
- 39039. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the latest python source snapshot.
- 39038. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Modified documentation so the paragraphs would fit in an 80 column
screen by making sure that each line occupies no more than 72 columns. - 39037. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Added new, more complex, test for branching (using the OR ('|') operator)
in Regular Expressions. - 39036. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the latest python source snapshot.
- 39035. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Changed the generic VERBOSE flag to be VERBOSE_SRE_ENGINE so that it can
be defined at the make level without potentially interfering with other
modules. - 39034. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Moving these Documentation changes into their own branch so that the minor
changes will not force the documentation suggestion changes to also be
included; they will now only be included in their own branch, for issue 12. - 39032. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Better comment for the end of line test.
- 39031. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Merged in changes from the latest python source snapshot.
- 39030. By Jeffrey C. "The TimeHorse" Jacobs <email address hidden>
-
Fixed some spelling mistakes in the test proceedures.
Branch metadata
- Branch format:
- Branch format 6
- Repository format:
- Bazaar pack repository format 1 with rich root (needs bzr 1.0)