It's possible that certain CM environments won't preserve the regex
setting and set all config fields as string values. Be smart and fall
back to converting from string to RegExp. It gets a bit messy because
RegExp() will automatically add the //'s to enclose the string, so we
strip them off if we see them set at the beginning and end of the
string.
It's possible that certain CM environments won't preserve the regex setting and set all config fields as string values. Be smart and fall back to converting from string to RegExp. It gets a bit messy because RegExp() will automatically add the //'s to enclose the string, so we strip them off if we see them set at the beginning and end of the string.