super-expressive icon indicating copy to clipboard operation
super-expressive copied to clipboard

Numeric Range

Open Lyiharilam opened this issue 1 year ago • 0 comments

Hello, I was wondering if there is any capability to generate numeric ranges within your library. Specifically, if we consider a range with a start of 1 and an end of 17, the desired output would be something like ([1-9]|1[0-7]).

I'm curious if such functionality is already supported in your library, or if I might have overlooked it. I find everything about super-expressive to be great, and a feature like this would be incredibly useful.

If implementing numeric ranges proves to be challenging, could you consider adding the ability to use string subexpressions? This way, when using packages like to-regex-range for generating numeric ranges one could seamlessly insert their output just like in currently existing .subexpression but with string argument type instead of SuperExpressive instance.

For reference: https://3widgets.com/ https://www.npmjs.com/package/to-regex-range

Lyiharilam avatar Jan 12 '24 09:01 Lyiharilam