On Thu, 2015-10-01 at 12:26 +0200, Rainer Jung wrote: > Since it gets more common to use the expression parser for string > operations and not only for boolean checks, I think it would be useful > (and powerful) to support > > s/PATTERN/REPLACEMENT/FLAGS > > and allow back references in REPLACEMENT. The operation would not try to > do the replacement in place but create a new string according to the > given PATTERN and REPLACEMENT.
Are you mixing two things? That's well-established regexp syntax, but you're looking at applying it to a different class expressions. I think the most interesting issue is to define your behaviour. > Header set X-USER "expr=%{REMOTE_USER} =~ s/([^@]*)@.*/$1/" Aha! In terms of the expression parser, that looks like capturing a side-effect (as opposed to a true/false result). Maybe it would work with something like C comma-list syntax? But I expect the line of least resistance would be to use plain regexp rather than expr. -- Nick Kew