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

Automatic validation of concern, company, brand and product name #3

Open
5h3rr1ll opened this issue Feb 22, 2019 · 1 comment
Open
Labels
function A functionality that is still needed.

Comments

@5h3rr1ll
Copy link
Owner

A function that frees the name strings from special characters and which makes sure that large and lower case is correct. Best would be a regular expression that also considers other common letters like French letters.

@5h3rr1ll 5h3rr1ll added the function A functionality that is still needed. label Feb 22, 2019
@5h3rr1ll
Copy link
Owner Author

5h3rr1ll commented Mar 7, 2019

Just read something in the python docu in the regex how to do section, which could help.

We should be able to create a regex function, which checks the origin of a concern, company, brand or product to set the language accordingly. 😍

"L
LOCALE
Make \w, \W, \b, \B and case-insensitive matching dependent on the current locale instead of the Unicode database.

Locales are a feature of the C library intended to help in writing programs that take account of language differences. For example, if you’re processing encoded French text, you’d want to be able to write \w+ to match words, but \w only matches the character class [A-Za-z] in bytes patterns; it won’t match bytes corresponding to é or ç. If your system is configured properly and a French locale is selected, certain C functions will tell the program that the byte corresponding to é should also be considered a letter. Setting the LOCALE flag when compiling a regular expression will cause the resulting compiled object to use these C functions for \w; this is slower, but also enables \w+ to match French words as you’d expect. The use of this flag is discouraged in Python 3 as the locale mechanism is very unreliable, it only handles one “culture” at a time, and it only works with 8-bit locales. Unicode matching is already enabled by default in Python 3 for Unicode (str) patterns, and it is able to handle different locales/languages."

Source: https://docs.python.org/3/howto/regex.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
function A functionality that is still needed.
Projects
None yet
Development

No branches or pull requests

1 participant