Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cases where the pattern is part of a word #4

Open
2 tasks done
luizvbo opened this issue Jan 4, 2023 · 1 comment
Open
2 tasks done

Cases where the pattern is part of a word #4

luizvbo opened this issue Jan 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@luizvbo
Copy link

luizvbo commented Jan 4, 2023

Checklist

  • There are no similar reports on existing issues (including closed ones).
  • I was in the master branch of the latest code.

Is your feature request related to a problem? Please describe

I don't know if it's a desired behaviour, but the package doesn't consider patterns that are part of a word. E.g., the code:

CommonRegex.dates("The spyware Trojan 12")

returns ['jan 12']. I would expect an empty list instead.

Describe the solution you'd like

I would expect an empty list (in the example above), given that "jan" is part of the token "Trojan".

@brootware
Copy link
Owner

Hey @luizvbo , yeah it's actually not a desired behaviour and seems to have the same result in original commonregex package too. Will need sometime to figure out the proper regex for it. In the mean time if you need to parse dates, I would suggest using the date function from python standard library.

@brootware brootware added the bug Something isn't working label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants