<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Message: 4<br>
Date: Sat, 24 Sep 2011 09:31:34 +0200 (CEST)<br>
From: Jakub Jankowski <<a href="mailto:shasta@toxcorp.com">shasta@toxcorp.com</a>><br>
Subject: Re: [syslog-ng] How to send tracebacks through syslog-ng?<br>
To: Syslog-ng users' and developers' mailing list<br>
<<a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a>><br>
Message-ID: <<a href="mailto:alpine.LNX.2.00.1109240928240.15891@bluzg.slackware.pl">alpine.LNX.2.00.1109240928240.15891@bluzg.slackware.pl</a>><br>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed<br>
<br>
On 2011-09-24, Luis Pugoy wrote:<br>
<br>
> rewrite r_rewrite_subst { subst("a*", "?", value("MESSAGE") type("pcre")<br>
> flags("utf8" "global")); };<br>
><br>
> I thought that it would replace 0 or more occurrences of 'a' with a question<br>
> mark. However, when the input is 'a', the output becomes 'a?'. It just<br>
> appends a question mark at the end. 'aa' also becomes 'aa?'. What is weirder<br>
> still is that even if the input does not contain 'a', the question mark is<br>
> still appended. So '1' becomes '1?'.<br>
<br>
Well, does "1" match /a*/ ? :)<br>
It doesn't make any difference if that's /a*/, /b*/ or /.*/ - this kind of<br>
regexp matches everything, even an empty string.<br>
<br>
HTH<br>
<br>
--<br>
Jakub Jankowski|<a href="mailto:shasta@toxcorp.com">shasta@toxcorp.com</a>|<a href="http://toxcorp.com/" target="_blank">http://toxcorp.com/</a><br>
GPG: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D</blockquote><div><br></div><div>Hello Jakub.</div><div><br></div><div>Thanks for the reply. You're right in that "1" matches /a*/, but wouldn't the resulting replacement be "?" instead of "1?" ? Also, if I just use /a/ and use "a" as input, it does not seem to match. The text is still outputted as "a". </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> </blockquote></div>