JSVerbalExpressions
JSVerbalExpressions copied to clipboard
JavaScript Regular expressions made easy
Lookaheads and [lookbehinds](https://github.com/tc39/proposal-regexp-lookbehind) are probably worth considering.
Hello, Can I feed a regex pattern to verbal expressions, and get back the verbal express representation?
Following up on go-oleg's comment on issue #17: I tried adding his suggestion to add names to capture groups. I've got something working but wanted to run my ideas past...
I've been thinking about re-writing JSVerbalExpressions to use function composition rather than the builder-like pattern it has now. So now the README.md describes a simple example for using VerbalExpressions as...
`VerEx().beginCapture().find('http').or('ftp').endCapture().then(':')` i want result like /((http|ftp):)/ but /(http|ftp:)/ why?
Given the relatively small size of the VerbalExpression class and its general usefulness I feel it would be easy and helpful to port it to other languages. I see that...
Even if the regexes produced are optimized, it'll still be worth doing. If possible, a guide for how to write perf tests would be helpful, too. Are there any recommended...
Would non-capturing groups be a valuable addition?
For example, ```js const regex = VerEx().startOfLine().then('abc').or().then('def').endOfLine(); ``` throws the following error ```js SyntaxError { message: 'Invalid regular expression: /^(?:(?:abc))|(?:(?:def)$/: Unterminated group', } ``` This traces to how `_suffixes` is...
Could we add support for back references? ```js /** * Match a previously captured substring * @param {Number} number which back reference to match * @return {VerbalExpression} same instace of...