Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
carafelix opened this issue Jul 18, 2024 · 0 comments

Comments

@carafelix
Copy link
Contributor

carafelix commented Jul 18, 2024

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 carafelix changed the title Question: how to archieve a capturing group with one alternative being assert position at start/end Question: how to archieve a capturing group with one alternative being assert position at start/end? Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant