-
-
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
Create "regex within regex" for subcategories #51
Comments
By the way, in some situations, the number of children may be too large (like international phone number codes), so I suggest the following for such circumstances:
|
When you say 'too large' how large is that? |
It depends. In my opinion, over 100 lines would be a lot but still bearable. 200+ is too large. |
#114 is a great example where it may be useful. |
Some regex have sub-categories, for example:
As such, I propose we change our code into:
We want to keep the same object for each child in case we have anything special to add like a website or a cool description etc. It doesn't cost us much to do this, but it is helpful!
Also, our regex for the children can be much broader. Read it as:
Because the children only run when the parents do, the child regex can be lighter.
As an aside, Mastercard have very helpfully provided a CSV table of all the companies and what their Mastercard subrange is:
https://www.mastercard.us/en-us/business/issuers/get-support/simplified-bin-account-range-table.html
The text was updated successfully, but these errors were encountered: