API module to support the integration of http://xregexp.com/ so other modules don't have to include it and to avoid conflicts.
This module uses the Libraries API. Use version 7.x-2.0-alpha2 or newer!
Installation
Download the XRegExp Library and put it under sites/all/libraries/xregexp or sites/>domain</libraries/xregexp and enable the module.
You can download XRegExp from XRegExp, use the latest version.
Usage
If your module wishes to use the xregexp library you can load it like this:
libraries_load('xregexp');
If you have XRegExp 2.x, this will load the xregexp-all.js file. This means XRegExp is loaded with all its plugins (except backcompat.js, which you can still manually enable through the UI).
If you have XRegExp 1.x, this will load the xregexp.js file. You can still enable all the plugins you downloaded through the UI.
If you set 'Include Library' to 'No' in the UI, the XRegExp library will not be included when you load the library. All the plugins you enabled will be included as normal. This is useful when you use this module in combination with an other module that provides the XRegExp library, so you can prevent a clash. For example: The Syntax highlighter module has the XRegExp library baked into the syntaxhighlighter plugin.
Both versions of the library have one variant.
For the 2.x version this variant is called 'small' and can be loaded like this:
libraries_load('xregexp', 'small');
In stead of the xregexp-all.js file, the xregexp.js file will be loaded (located in the src folder). This means only the bare functianality is loaded, along with the plugins you enabled.
For the 1.x version this variant is called 'minified' and can be loaded like this:
libraries_load('xregexp', 'minified');
This will load the xregexp-min.js file in stead of the xregexp.js file.
Project information
- Project categories: Developer tools, Integrations
1 site reports using this module
- Created by attiks on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.

