Unexpected behaviour in fuzzy matching with limited character set

Create issue
Issue #373 duplicate
Sebastian Schönnenbeck created an issue

The fuzzy matching procedure seems to ignore the allowed characters as soon as the character set is not a single expression:

Example:

#!python

regex.findall("(\d+){i<=2:[a-b]}", "123X4Y5")
# returns ['123', '4', '5'] as expected

regex.findall("(\d+){i<=2:[ab]}", "123X4Y5") # Should return the same thing
# returns ['123X4Y5'] ignoring the restriction of insertions coming from [ab]

Operation system: Ubuntu 18.04.4

Python version: 3.8.2

Comments (4)

  1. Matthew Barnett repo owner

    You didn’t say which version of regex you’re using, and I cannot reproduce the problem on the current version. Did you check whether there was an update?

  2. Sebastian Schönnenbeck reporter

    Thanks a lot for the quick reply. I had the latest version on conda (2020.4.4). After updating to 2020.5.13 from conda-forge everything seems to work as expected. Also, while we are at it: Thanks a ton for this great package, really enjoy using it.

  3. Log in to comment