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

Question: how to archieve a capturing group with one alternative being `assert position at start/end`?

Open carafelix opened this issue 7 months ago • 0 comments

I haven't found a way to archive the following regex: /(\s|^)etc/. Skill issue? Thanks in advance

A similar result but for a non-capturing group it's doable with:

SuperExpressive()
    .anyOf
    .whitespaceChar
    .startOfInput
    .end()
    .toRegex()
// /(?:^|[\s])/
    ```

carafelix avatar Jul 18 '24 03:07 carafelix