What is it?
XRegExp is an open source (MIT license) JavaScript library that provides an augmented, extensible, cross-browser implementation of regular expressions, including support for additional syntax, flags, and methods.
XRegExp is fully compliant with the regular expression flavor specified in ECMA-262 Edition 3 (ES3), and has been tested with Internet Explorer 5.5–8, Firefox 2–3.5, Safari 3–4, Chrome 1–2, and Opera 9. XRegExp uses feature detection—no browser sniffing.
Features
- 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), andx
, 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.
No comments:
Post a Comment