Skip to content

Commit bb6b092

Browse files
Improve explanation of Python \z situation
Signed-off-by: David A. Wheeler <[email protected]>
1 parent df43b7e commit bb6b092

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/Correctly-Using-Regular-Expressions-Rationale.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,13 @@ be nearly universal:
507507
to add \A and \z to ECMAScript/JavaScript, and it advanced to stage 2,
508508
but it seems to be stuck there. We intend to see if we can help it advance.
509509
* Python: Python supports \A, but it uses the unique \Z instead of the
510-
\z used everywhere else.
511-
We'll ask to see if it can be advanced.
510+
\z used everywhere else for end-of-string.
511+
We'll ask to see if \z could be supported in addition to \Z for end-of-string.
512+
We'll probably start with a minor git request (as this is a really
513+
small change), otherwise we'll create a PEP, depending on the desires
514+
of the Python community.
515+
In current versions of Python3 a \z in a regex raises an exception, so
516+
adding \z for end-of-string would be a backwards-compatible addition.
512517

513518
## Authors and contributors
514519

0 commit comments

Comments
 (0)