Open mdjastrzebski opened 8 months ago
I have a candidate for the URL patterns in my repo: . i am writing an article about using ts-regex-builder to build this regex. The point I am trying to make in the article is that this library allows you to write regular expressions like normal hygienic software. So, I break the URL pattern into sub-patterns (Scheme, Authority, ....). Can you take a look at what I've done before I put together a full PR and provide your feedback.
@PaulJPhilp awesome. Please send me some link to the code and I'll take a look.
Maciej:
Sorry for the delay. I ran into a bug (bug report to follow). Here is my repo with the partially completed URL pattern. Please let me know your feedback.
https://github.com/PaulJPhilp/ts-regex-builder
Thank you, Paul
@PaulJPhilp you're definitely going in the good directions. The difficulty of the task, imo lies in the fact that URL is a complex pattern built from different smaller patterns, and it's a tedious work to get all of these right.
I've lefts some comments on the last commit: https://github.com/PaulJPhilp/ts-regex-builder/commit/0fdbf6c2fe6f69ea70dfdbb26a9991d1ddf614d5#diff-350009127029ecbdcc6940f99827bae2f3ece87b095a287c48db47ace9ef363dR43
BTW Pls create PR next, time, as it's make review and discussion happen in one, well defined place.
Is your feature request related to a problem? Please describe. Provide regex patterns for common use cases like:
Each pattern should be available in two versions:
Describe the solution you'd like Patterns will be imported through
ts-regex-builder/patterns
import. See #72 for implementation of that part.Whole library is and should remain tree-shakable, so that unused patterns (and features) are removed by bundlers in order to reduce bundle size.
Describe alternatives you've considered
Checklist (for each pattern)
CC: @PaulJPhilp