regex

inline fun ParserState.regex(pattern: String): String

Matches the given regular expression pattern, returning the text that matched it. Fails if pattern could not be matched at the current point in the parser input.


inline fun regex(pattern: String): Parser<String>
inline fun regex(pattern: Regex): Parser<String>

Creates ParserState.regex parser.