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 ES3 and ES5, and has been tested with Internet Explorer 5.5–8, Firefox 2–3.6, Safari 3–4, Chrome 1–4, and Opera 9.5–10.5. It uses feature detection for its cross-browser support—no browser sniffing.
XRegExp 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 dotall or singleline mode), and x, for free-spacing and comments (aka extended mode).
- Provides a suite of 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.
Please feel free to join us and you are always welcome to share your thoughts even if you have more reference links related to other tips and tricks that our readers may like. |
|
|
The library also offers a suite of functions and methods that make complex regex processing a breeze.
And, it fixes the most commonly encountered cross-browser inconsistencies in regex behavior and syntax (compatible with all major browsers).
Download Javascript Regular Expression Library
Requirements: No Requirements
Compatibility: All Major Browsers
Website: http://xregexp.com/