XRegExp.addToken, fundamentally changes XRegExp's implementation and allows you to easily create your own XRegExp plugins.
Here's XRegExp's abbreviated feature list from the brand new xregexp.com (which includes extensive documentation and code examples):
- Adds new regex and replacement text syntax, including comprehensive support for named capture.
- Adds two new regex flags:
s, to make dot match all characters (aka singleline mode), and
x, for free-spacing and comments (aka extended mode).
- Provides a suite of 12 functions and methods that make complex regex processing a breeze.
- Automagically fixes the most commonly encountered cross-browser inconsistencies in regex behavior and syntax.
- Lets you easily create and use plugins that add new syntax and flags to XRegExp's regular expression language.
The full list of changes can be seen in the changelog. Please let me know if you find any bugs or have any suggestions for the library. I'd also love to hear about projects or sites that are using XRegExp (I've got a few listed on the XRegExp homepage now).