xregexp
xregexp copied to clipboard
Extended JavaScript regular expressions
Current behavior: `XRegExp.build`'s `{{name}}` syntax is a literal string when used within character classes. E.g., although `XRegExp.build('{{x}}', {x: '.'});` produces `/(?:.)/`, `XRegExp.build('[{{x}}]', {x: '.'});` returns `/[{{x}}]/`. Originally, this was intentional,...
Hey @slevithan. First off, great library. Super helpful in overcoming some of JavaScript RegExp's shortcomings! Would love to see support for the possessive quantifier. I know it requires the lookahead...
bug ? addToken not work when XRegExp(pattern: RegExp) ```ts import addSupportToXRegExp, { IOptions } from 'xregexp-plugin-hanzi-cjk'; import * as XRegExp from 'xregexp'; let options: IOptions = { // set a...
current XRegExp can't check a plugin already install or not and only can addToken, but can't remove token hope can have a configable for check plugin is installed and disable...
In the Unicode data generators (under `tools/`) and Unicode addons, rename `isBmpLast` as the more descriptive `hasOrphanHighSurrogatesAndAstral`. It's only used for category `C` and property `Any`, so the long name...
Suppose that I have this regular expression: /abcd/ Suppose that I want to check the user input against that regex and disallow entering invalid characters in the input. When user...
Following ES6, make the token that blocks invalid metasequences ([here](https://github.com/slevithan/xregexp/blob/5b974aa810b7c74c92e74b25080624dbcb3cbbe0/src/xregexp.js#L1724-L1742)) even stricter by also making it an error to escape punctuation, etc. in cases where the escaped character is not...
Firefox is giving me this notice in the console when using xregexp: > mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the...
- Allow an `options` object as the first optional argument for `XRegExp.exec`/`test`/`replace`/`match`/`forEach`, and allow an `options` object for each `XRegExp.replaceEach` replacement array. - This will replace or overload/supersede the following...