retina icon indicating copy to clipboard operation
retina copied to clipboard

Conditional replacement syntax

Open m-ender opened this issue 8 years ago • 1 comments

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 avatar Dec 13 '15 14:12 m-ender

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.

m-ender avatar Jan 10 '18 20:01 m-ender