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 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.