Function regexParser

  • Returns a parser that matches a regex. If you pass in a string, it will get converted to a regex. The regex should always match from the start of the input. If you pass in a string, a ^ will get prepended to it.

    Parameters

    • str: string | RegExp

      regex string or RegExp instance to match

    • options: string = ""

      regex options (i = ignore case, g = global, m = multiline, u = unicode)

    Returns Parser<string>

    • parser that matches the given regex

Generated using TypeDoc