From e8a8d28aa32a945dfbed6ef41d29f30daf07e08d Mon Sep 17 00:00:00 2001 From: Matthew Barnett Date: Wed, 24 Jul 2024 22:29:17 +0100 Subject: [PATCH] Git issue 539: Bug: Partial matching fails on a simple example --- README.rst | 16 -- changelog.txt | 4 + docs/Features.html | 628 +++++++++++++++++++++--------------------- regex_3/_regex.c | 367 ++++++------------------ regex_3/regex.py | 2 +- regex_3/test_regex.py | 13 + setup.py | 2 +- 7 files changed, 416 insertions(+), 616 deletions(-) diff --git a/README.rst b/README.rst index 74fd613..ecbacbf 100644 --- a/README.rst +++ b/README.rst @@ -3,11 +3,6 @@ Introduction This regex implementation is backwards-compatible with the standard 're' module, but offers additional functionality. -Note ----- - -The re module's behaviour with zero-width matches changed in Python 3.7, and this module follows that behaviour when compiled for Python 3.7. - Python 2 -------- @@ -327,22 +322,11 @@ Sometimes it's not clear how zero-width matches should be handled. For example, .. sourcecode:: python - # Python 3.7 and later >>> regex.sub('.*', 'x', 'test') 'xx' >>> regex.sub('.*?', '|', 'test') '|||||||||' - # Python 3.6 and earlier - >>> regex.sub('(?V0).*', 'x', 'test') - 'x' - >>> regex.sub('(?V1).*', 'x', 'test') - 'xx' - >>> regex.sub('(?V0).*?', '|', 'test') - '|t|e|s|t|' - >>> regex.sub('(?V1).*?', '|', 'test') - '|||||||||' - Added ``capturesdict`` (`Hg issue 86 `_) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/changelog.txt b/changelog.txt index 8989726..38f2ba1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +Version: 2024.7.24 + + Git issue 539: Bug: Partial matching fails on a simple example + Version: 2024.6.22 Git issue 535: Regex fails Unicode 15.1 GraphemeBreakTest due to missing new GB9c rule implementation diff --git a/docs/Features.html b/docs/Features.html index d6094c8..f1976c5 100644 --- a/docs/Features.html +++ b/docs/Features.html @@ -1,20 +1,21 @@ - + - + README.rst