modRegExp()
Creates a new copy of a regular expression with modified flags.
This function is valid in v2.0.0 to v2.24.3. This function has been downloaded 64 times.rgx
. The standard flags are of course g
for global, i
for ignoreCase and m
for multiline. In some environments other flags are also available. In order to assure that the duplicate will have specified flag you can just add the flag character (optionally you can prefix it with a +
) to the string. In order to assure that the duplicate will exclude a specified flag you can enter - followed by the flag character in this string. In order to toggle the flag in the duplicate you can prefix the flag character with !. For example "g-i!m"
(which is the same as "+g-i!m"
) will ensure the g
flag is included, ensure the i
flag is excluded and toggle m
.rgx
with modified flags as specified by the modifiers
string.This function is directly required by the following functions: