Tries to parse a string as a regular expression. If this fails it tries to convert the string into a Regular Expression with a literal search for the string value.
The string to parse
Optional
options: string | LiteralSearchOptions = {}Options related to how to parse the string value for the literal search
A wrapped version of
parseToRegexOrLiteralSearch
that caches RegExp's based on inputs of RegExp string + behavior + default flagsSee
parseToRegexOrLiteralSearch