Converts a string to a regular expression.
The string value to convert.
Indicates whether to escape special characters in the string. Default is false.
The flag(s) to apply to the regular expression. Default is 'global'.
The converted regular expression or undefined if the conversion fails.
Converts a string to a regular expression.