You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
Defining larger models with several regex patterns with lots of repetition can become a maintenance hell for users. Especially that many patterns are usually common ones such as URLs, numbers only, negative numbers etc...
Was thinking, it would be cool to have a pre-defined set of patterns in the lib to allow users to do shortcuts when defining models. Example:
Instead of having to define something like this as a model:
Can save lots of effort in maintaining and re-implementing common patterns by the user especially that as the model gets more complex, repeated patterns become confusing and error prone.This could potentially be achieved via implementing a set of methods to generate regex expressions based on pre-defined patterns.
What do you think?
The text was updated successfully, but these errors were encountered:
Loving the contributions @aymanfarhat keep em coming for sure. Yeah it'll definitely be cool to define helper matchers that are extendable and we provide a default set off the shelf. Doesn't cost much to put it in place also.
Defining larger models with several regex patterns with lots of repetition can become a maintenance hell for users. Especially that many patterns are usually common ones such as URLs, numbers only, negative numbers etc...
Was thinking, it would be cool to have a pre-defined set of patterns in the lib to allow users to do shortcuts when defining models. Example:
Instead of having to define something like this as a model:
Would be cleaner to (optionally) use a helper method in the module to define common patterns this way:
Can save lots of effort in maintaining and re-implementing common patterns by the user especially that as the model gets more complex, repeated patterns become confusing and error prone.This could potentially be achieved via implementing a set of methods to generate regex expressions based on pre-defined patterns.
What do you think?
The text was updated successfully, but these errors were encountered: