callstack/ts-regex-builder

RFC: core scope (MVP)

mdjastrzebski opened this issue · 1 comments

In order to prepare MVP version we need to implement core regex features so that the package is useful for typical use cases.

Core scope

  • Features
    • buildRegex, buildPattern top-level APIs
      • RegExp flags
    • quantifiers
      • base: one, oneOrMore, zeroOrMore, optionally
      • repeat
    • choiceOf alternative
    • character classes
      • base classes: any (.), digit (\d), word (\w), whitespace (\s)
      • anyOf class
      • characterClass helper
      • characterRange class
      • inverted modifier (^)
    • captures:
      • capture
    • anchors
      • base: startOfLine (^), endOfLine ($)
  • Documentation
    • Getting started guide
    • API reference
    • 5 meaningful examples
  • CI/CD
  • Publish to NPM

Things after MVP

  • Lookahead / NegativeLookahead
  • More exotic character classes
  • More exotic anchors
  • Local capture (not sure if relevant)
  • Character class operations: union, intersection, etc (not sure if relevant)
  • Other anchors
    • wordBoundary (\b)
    • inverted anchors
  • Advanced captures (not sure if relevant)
    • transform option
    • tryCapture with transform
    • reference (as)

I'll work on startOfLine (^), endOfLine ($) anchors