Parses a given input and, if it is a regular expression, replaces all occurrences. of the custom \i pattern with a regex pattern that matches valid identifier names.
\i
The input to parse.
A new RegExp with the \i pattern replaced, or the original input if it is not a RegExp
RegExp
Parses a given input and, if it is a regular expression, replaces all occurrences. of the custom
\i
pattern with a regex pattern that matches valid identifier names.