Closed josephfrazier closed 5 years ago
@josephfrazier, should I release this as v4.2.3?
I believe so, yes. I tested it by doing the build, and then cd'ing to a temporary directory, running npm install ~/workspace/xregexp
(where my checkout is), then running the test code from #262:
const XRegExp = require('xregexp');
const date = XRegExp(
`(?<year> [0-9]{4} ) -? # year
(?<month> [0-9]{2} ) -? # month
(?<day> [0-9]{2} ) # day`, 'x');
let match = XRegExp.exec('2017-02-22', date);
console.log(match.year);
You can compare it with npm i xregexp@4.2.2
to confirm that the test fails in that case (as reported in #262)
This should be a quick/dirty fix for https://github.com/slevithan/xregexp/issues/262