You may also install it on RingoJS using the command
ringo-admin install aaditmshah/regex.
You may install it as a component for web apps using the command
component install aaditmshah/regex.
Regex constructor is compatible with the native
RegExp constructor. You may pass it a
regexp object or a source string:
var Regex = ;var regex = /*abb/;
Like the native
RegExp constructor instances of
Regex have the following methods:
test method is used to simply test whether a string matches the regex pattern:
regex; // trueregex; // trueregex; // trueregex; // trueregex; // trueregex; // falseregex; // false
Regex constructor currently supports the following regex operations:
The following changes were made in this version of Regex:
- Supports basic regex operations - concatenation, alternation, grouping and closure. No support for pattern composition or combining subexpressions yet.