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

Issue with pattern encoder #36

Closed
deepthought15 opened this issue Oct 8, 2020 · 1 comment · Fixed by #37
Closed

Issue with pattern encoder #36

deepthought15 opened this issue Oct 8, 2020 · 1 comment · Fixed by #37

Comments

@deepthought15
Copy link

When I debug the code, I found the the pattern regex is not working fine for me. Its converting everything to '-'.
Code under invoicenet/acp/data.py

pattern = text
pattern = re.sub(r"\p{Lu}", "X", pattern)
pattern = re.sub(r"\p{Ll}", "x", pattern)
pattern = re.sub(r"\p{N}", "0", pattern)
pattern = re.sub(r"[^Xx0]", "-", pattern)

@naiveHobo
Copy link
Owner

Thank you for pointing this out! This was due to a python 2.7 to python 3.7 jump. Those regex used to work in python 2.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants