JSVerbalExpressions icon indicating copy to clipboard operation
JSVerbalExpressions copied to clipboard

JavaScript Regular expressions made easy

Results 28 JSVerbalExpressions issues
Sort by recently updated
recently updated
newest added

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...

enhancement

`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...

enhancement

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...