Hacker News new | ask | show | jobs
by jehna1 2692 days ago
Here's a somewhat related project that aims to make regular expressions more verbose:

https://github.com/VerbalExpressions/JSVerbalExpressions

Here's a simple example for matching URLs:

    const tester = VerEx()
      .startOfLine()
      .then('http')
      .maybe('s')
      .then('://')
      .maybe('www.')
      .anythingBut(' ')
      .endOfLine();
The project has been ported to many different languages and it outputs a normal regular expression that you can use to match your text.