-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Add support for list of regex in regex.json #227
Comments
Hi, I would like to know about this issue in detail. Do you want multiple regex patterns separated by vertical pipe ( | ), or do you want any change in the code to support a list of regex patterns? I can solve this issue by creating following blocks with different regex pattern for different type of phone Number Patterns.
|
I would like to have a list of regexp, so yes, changes in code are needed. Pywhat should concatenate all these regexes into one using pipes(|). Therefore, only regex loader function should be updated. |
Hey, I am able to combine regex patterns dynamically using |
Hi! I will take our THM flag regex to better show what we want to achieve. (The only part changed is We want to separate multiple regex formats of one identifier into a list of regexes, instead of having all of them together and separated by I am not sure how PyWhat should use them after tho. Merged them back into one with I hope this clears some things. Maybe @bee-san has some more suggestions. :)
|
Is your feature request related to a problem? Please describe.
Many regexes (like phone numbers or coordinates) have several formats. Currently,
|
can be used to separate formats, but it makes regex longer and harder to understand.Describe the solution you'd like
"Regex" should be a list of regexes.
The text was updated successfully, but these errors were encountered: