Vyxal / Vyxal

A code-golfing language experience that has aspects of traditional programming languages - terse, elegant, readable.

Home Page:https://vyxal.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add regex built-ins

mathcat4 opened this issue · comments

eg. first match, all matches, return groups, ...

Regex features (stolen from python's re library):

  • Search => return first index of pattern match
  • Match => return the portion of the string that pattern matches
  • Matches at all => return a boolean whether a match is present
  • Matches Fully => return whether the entire string matches the pattern
  • Split => Split a string on a pattern
  • Find All => find all non-overlapping matches of pattern in string
  • Find All overlapping => Find all but more painful to implement
  • Substitute => Replace instances of pattern with string/function taking match as input
  • Escape => Take a string and escape it
  • Groups => Return a list of all groups of a match
  • Span => Return the start and end position of a match

Strikethrough represents implemented.