Brian Candler wrote:
Here's something weird. I'm trying to concatenate some strings which contain
backslash n (i.e. not a newline).
Well... that's all pretty hacky. It's made worse by Reply-Message
being automatically expanded, whereas other attributes aren't. Try your
tests below using
Here's something weird. I'm trying to concatenate some strings which contain
backslash n (i.e. not a newline).
In a normal string literal, I have to enter four backslashes:
update reply {
Reply-Message := anb
}
(\\n gives a newline, \\\n gives backslash followed by newline)
But when I
Brian Candler writes:
Or is there another way I can concatenate strings, which doesn't involve
expanding them into another string?
The workaround I've used for this is to feed the value through a regexp
match to get it into %{1}, which does not seem to be subject to unescaping.
try:
if
On 09/11/12 15:39, Brian Candler wrote:
Here's something weird. I'm trying to concatenate some strings which contain
backslash n (i.e. not a newline).
Uh oh... here be dragons!
In a normal string literal, I have to enter four backslashes:
update reply {
Reply-Message := anb
}
try:
if (%{reply:Reply-Message} =~ /(.*)/) {
update reply {
Reply-Message = stuff %{1}
}
}
Nice idea, but it appears to suffer the same expansion problem.
As you have written it gives this error:
Bare %{...} is invalid in condition at: %{reply:Reply-Message} =~ /(.*)/)
Brian Candler wrote
try:
if (%{reply:Reply-Message} =~ /(.*)/) {
update reply {
Reply-Message = stuff %{1}
}
}
Nice idea, but it appears to suffer the same expansion problem.
As you have written it gives this error:
Bare %{...} is invalid in condition
6 matches
Mail list logo