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

brackets handled incorrectly #61

Open
maxbachmann opened this issue Dec 15, 2020 · 3 comments · May be fixed by #88
Open

brackets handled incorrectly #61

maxbachmann opened this issue Dec 15, 2020 · 3 comments · May be fixed by #88
Labels
parsing Name parsing result is not correct

Comments

@maxbachmann
Copy link

When clean_name() is used in the following way:

>>> cleanco('company (country) Pvt. Ltd.').clean_name()
'company (country'

it strips not only the organisation name.
The expected output would be: company (country)

@petri petri added the parsing Name parsing result is not correct label Jan 30, 2021
@JonasR
Copy link

JonasR commented May 15, 2023

This is caused by https://github.com/psolin/cleanco/blob/master/cleanco/clean.py#L22.
A fix would be to add parentheses to the list of allowed characters

tail_removal_rexp = re.compile(r"[^\.\w\(\)]+$", flags=re.UNICODE)

Should I open a PR for this? The project seems abandoned unfortunately.

@psolin
Copy link
Owner

psolin commented May 15, 2023 via email

@JonasR JonasR linked a pull request Jul 2, 2023 that will close this issue
@JonasR
Copy link

JonasR commented Jul 2, 2023

@psolin There you go. Sorry about the mega delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parsing Name parsing result is not correct
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants