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

Conditional replacement syntax #36

Open
m-ender opened this issue Dec 13, 2015 · 1 comment
Open

Conditional replacement syntax #36

m-ender opened this issue Dec 13, 2015 · 1 comment

Comments

@m-ender
Copy link
Owner

m-ender commented Dec 13, 2015

Boost has conditional replacement syntax, where you can choose between two substitutions based on whether a given group was matched or not. That feature would be really useful, although I'd probably change the syntax to ${cond?true:false} (as neither ? nor : are part of valid group names).

@m-ender
Copy link
Owner Author

m-ender commented Jan 10, 2018

A limited way of this is possible in Retina 1.0 by doing something like ${$1} where $1 evaluates to which other group you want to include. Not quite as flexible, but it's a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant