<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Message: 4<br>
Date: Wed, 21 Sep 2011 21:20:44 +0200<br>
From: Gergely Nagy <<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>><br>
Subject: Re: [syslog-ng] Is it possible to replace a string with a new<br>
line using rewrite?<br>
To: <a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a><br>
Message-ID: <87pqitr9bn.fsf@luthien.mhp><br>
Content-Type: text/plain<br>
<br>
Luis Pugoy <<a href="mailto:lpugoy@insynchq.com">lpugoy@insynchq.com</a>> writes:<br>
<br>
> I am trying to replace a string with a newline using rewrite. Is it<br>
> possible? Thanks.<br>
<br>
rewrite r_nl {<br>
subst("<insert regexp here>",<br>
"\n", value("MSG"));<br>
};<br>
<br>
Or, if you want to replace the whole MSG with a newline:<br>
<br>
rewrite r_nlmsg { set("\n", value("MSG")); };<br>
<br>
--<br>
|8]<br>
<br></blockquote><div><br></div><div>Thanks. I was using single quotes ('\n') so it wasn't working for me before. I didn't realize that there's a distinction between single and double quotes in syslog-ng. </div>
</div>