type(patterns) === "Array") ? patterns : [patterns];

						for (var j = 0; j < patterns.length; ++j) {
							var pattern = patterns[j],
								inside = pattern.inside,
								lookbehind = !!pattern.lookbehind,
								greedy = !!pattern.greedy,
								lookbehindLength = 0,
								alias = pattern.alias;

							if (greedy && !pattern.pattern.global) {
								// Without the global flag, lastIndex won't work
								var flags = pattern.pattern.toString().match(/[imuy]*$/)[0];
								pattern.pattern = R