This is a bug fix release that addresses a number of issues reported by users and teased out via the new test suite
RegExp.prototype.exec, RegExp.prototype.test, String.prototype.match, and String.prototype.replace ignore the lastIndex property of nonglobal regexes, even in browsers that get this wrong natively.XRegExp.execAt and XRegExp.iterate update the lastIndex property of global regexes (even though they doesn't use it) based on the spec for RegExp.prototype.exec and String.prototype.replace.callback funtion with XRegExp.iterate.RegExp.prototype.exec no longer throws an error in IE when called on a regex with capturing groups that match empty strings and provided a nonstring argument.undefined or no replacement value is provided to String.prototype.replace, it is type converted to the string "undefined".String.prototype.replace replacement functions (the full original string) is now a string primitive rather than a String object in IE6.RegExps provided to String.prototype.replace as the replacement value in old browsers that report typeof /regex/ == "function".undefined.This release significantly changes the API for XRegExp's suite of functions. A backward compatibility layer for XRegExp 1.0–1.2 is available at the end of the script (uncomment to enable).
XRegExp.execAt function.XRegExp.matchChain can now pass forward and return named or numbered backreferences as match values.(?imsx) mode modifier supported at the start of patterns only.RegExp.prototype.addFlags and added XRegExp.copyAsGlobal to take over its common use case.RegExp.prototype.forEachExec and replaced it with XRegExp.iterate.XRegExp.matchWithinChain to XRegExp.matchChain.XRegExp.matchChain's detailMode option.RegExp.prototype.validate since it had no strong use cases.XRegExp.addToken adds /y to token regexes when supported natively, for improved performance.XRegExp.addToken after XRegExp.freezeTokens throws a descriptive error.XRegExp calls to throw.RegExp.prototype.execAll since it is trivial to implement using RegExp.prototype.forEachExec.window, which allows it to be used in nonbrowser contexts."undefined" was inserted into the returned string in IE.lastIndex property of regexes created with the /g flag is not always reset to zero after running String.prototype.replace or String.prototype.match is now fixed automatically.lastIndex property of a regex is not updated during String.prototype.replace iterations (visible within replacement functions) is now fixed automatically.String.prototype.split and String.prototype.replace now consistently work with non-string context (this).[] caused incorrect results in some edge cases in Firefox only, due to a Firefox bug in handling empty negative lookahead.$nn backreferences in replacement text.String.prototype.replace were also fixed, mostly edge-case issues introduced in v1.0.XRegExp.addToken function.XRegExp.freezeTokens function.XRegExp.isRegExp function.XRegExp.matchWithinChain function.RegExp.prototype.validate method.RegExp.prototype.forEachExec method.RegExp.prototype.execAll method.${⋯} replacement text token now supports numbered backreferences (and thereby offers an otherwise-unavailable way to separate backreferences from literal numbers), in addition to named backreferences. This follows prior art in .NET, etc.lastIndex properties after zero-length matches are found by RegExp.prototype.test (already performed for RegExp.prototype.exec and String.prototype.match).XRegExp.version property.XRegExp.matchRecursive function (now a plugin).XRegExp.addPlugin, which was hard-coded to work with the Unicode plugin only. If you use this plugin, download an updated version (v0.3 or higher).limit argument of String.prototype.split is now followed consistently.$n tokens in replacement text are now limited to two digits, even when there are more than 99 capturing groups in your regex. Use ${nnn} for three or more digit backreferences.String.prototype.split, if the last match of the separator within the subject string ended at the end of the string, and the separator was capable of matching an empty string (e.g. /a?/), a trailing empty string value was not appended to the result array even when the separator did not match an empty string in that last case. This followed Firefox's native handling, but not the spec (which at least Opera follows correctly).XRegExp.matchRecursive could not return more than one match when the sticky (y) and global (g) modifiers were combined without using valueNames.RegExp.prototype.addFlags did not preserve previously applied, non-native modifiers (v0.5 only).XRegExp.matchRecursive function.XRegExp.escape function.XRegExp.cache function.RegExp.prototype.call/apply methods.(?#⋯).String.prototype.split method.RegExp.prototype.exec and String.prototype.match return values for nonparticipating capturing groups.lastIndex properties after zero-length matches are returned by RegExp.prototype.exec and String.prototype.match.(<name>⋯) to (?<name>⋯), which is the standard syntax in .NET, Perl, and PCRE, and under consideration for ES4.k modifier.y) and extended (x) modifiers. Sticky mode will be in JS1.8; both are proposed for ES4.RegExp object to the XRegExp constructor now returns a new copy, like the native RegExp constructor.XRegExp.overrideNative. The RegExp constructor cannot be overriden in JS1.8 or current ES4 proposals.k modifier.
(<name>⋯)\k<name>${name}result.name, or arguments[0].name in replacement functionsRegExp.prototype.addFlags method.XRE global object. XRE.overrideNative is now XRegExp.overrideNative.x modifier now ignores whitespace between a regex token and its quantifier, rather than collapsing it to (?:).s, aka singleline) modifier.x, aka extended) modifier.] in character classes.XRE.overrideNative function, which applies these regex extensions to the RegExp constructor.