<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: Export mail to a single line]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in Export mail to a single line of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Wed, 02 Dec 2009 16:31:02 +0200</lastBuildDateTag>		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30655/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Thank you for your efforts, unfortunately the recursive templates are gibberish to me <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_sad.gif" border="0" data-code=":(" data-definition="SD" alt=":(" style="width:16px;height:16px;" title="" class="bx-smile" /><br /><br />Fortunately I found another walkaround - I put in the &nbsp;initial filter that creates this template:<br /><br />------------<br />@@@ <noindex><a href="http://werwerwer" target="_blank" rel="nofollow">http://werwerwer</a></noindex><br /><br /><br />@@@<br /><br />this part of the text might be on a single line, multiple lines separated<br /><br />by<br /><br />any number<br /><br />of blank lines<br /><br /><br /><br />~~~dsfsdfsdf~~~ <br />--------------------<br />another line:<br />%organization=%REGEXPTEXT="whatever"<br />(whatever) - the original regex I use to parse the body<br /><br />This way when exporting the message to the file (using a second manual filter) I have the %organization field holding all the text in one line <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_smile.gif" border="0" data-code=":)" data-definition="SD" alt=":)" style="width:16px;height:16px;" title="" class="bx-smile" /> <br />
			<i>02 December 2009 16:31:02, <a href="http://www.ritlabs.com/en/forums/">Alex Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30655/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30655/</guid>
			<pubDate>Wed, 02 Dec 2009 16:31:02 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30564/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Ouch, I'm afraid that it's a bit over my head to develop a regexp that does this properly.<br />What you basically need is a regexp that gets the text between your markers. That's the easy part, you had that by yourself.<br /><br />Next thing would be a recursive template that deletes all intstances of empty lines, it needs to be recursive because you don't know how often those empty lines occur.<br /><br />Final thing would be a recursive template that replaces all single instances of a line feed into a space, so everything is placed on a single line.<br /><br />And I'm not that good in recursive templates. You might want to look at the macro library at <noindex><a href="http://www.silverstones.com/thebat/Library.html" target="_blank" rel="nofollow">http://www.silverstones.com/thebat/Library.html</a></noindex> It has some good examples of recursive templates. <br />
			<i>24 November 2009 17:20:21, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30564/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30564/</guid>
			<pubDate>Tue, 24 Nov 2009 17:20:21 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30561/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Sorry for not being more specific <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_sad.gif" border="0" data-code=":(" data-definition="SD" alt=":(" style="width:16px;height:16px;" title="" class="bx-smile" /><br /><br />Here is how some real text would look like:<br />-------<br />@@@ <noindex><a href="http://werwerwer" target="_blank" rel="nofollow">http://werwerwer</a></noindex><br /><br /><br />@@@<br /><br />this part of the text might be on a single line, multiple lines separated<br /><br />by <br /><br />any number <br /><br />of blank lines<br /><br /><br /><br />~~~dsfsdfsdf~~~<br />-------<br />or:<br />-------<br /><br />@@@http://asd.local/asdasdasd<br /> @@@<br /><br />hello asdasdaasd,<br /><br />please notice sldjflsdjflksdf<br /><br />10 X<br />sdfsdfsdfs<br /><br /><br /><br />~~~sdfsdfsdf~~~<br />--------<br />or:<br />--------<br />@@@ <noindex><a href="http://ddddddddddddddddddd" target="_blank" rel="nofollow">http://ddddddddddddddddddd</a></noindex><br /><br /><br />@@@<br /><br />sdfsdfsdfsdfsdf<br /><br /><br /><br />~~~sdfsdfsdfsd~~~<br /><br />Thanks! <br />
			<i>24 November 2009 07:20:13, <a href="http://www.ritlabs.com/en/forums/">Alex Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30561/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30561/</guid>
			<pubDate>Tue, 24 Nov 2009 07:20:13 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30558/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Give me real sample of the text you want to process and I'll see whether we can fix that.<br />My regexp worked on the text you gave as example:<br />-------------------<br />asd@ <br />123 <br />678 <br />@ert <br />-------------------<br />But in your second post you gave me:<br />-------------------<br />@@@unuseful text@@@ <br />line1 <br /><br />line2 <br />~~~unuseful text~~~ <br />-------------------<br />In the latter case the regexp should look like:"<br />%SetPattRegExp='(.*)@\n(.*)\n\n(.*)\n~(.*)'%- <br />%RegExpBlindMatch='%Text'%- <br />%SubPatt='2' %SubPatt='3' <br />Note that it's important to know whether the empty line between line1 and line2 is a real empty line or that it may contain a (number of) space(s).<br />My regexp supposes it's a real empty line. <br />
			<i>23 November 2009 20:40:17, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30558/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30558/</guid>
			<pubDate>Mon, 23 Nov 2009 20:40:17 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30557/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			I get nothing (blank when attempting to use this <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_sad.gif" border="0" data-code=":(" data-definition="SD" alt=":(" style="width:16px;height:16px;" title="" class="bx-smile" /><br /><br />Thanks! <br />
			<i>23 November 2009 16:44:10, <a href="http://www.ritlabs.com/en/forums/">Alex Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30557/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30557/</guid>
			<pubDate>Mon, 23 Nov 2009 16:44:10 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30555/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			When looking at the data you give in the first message, you get the wanteed results with this template:<br />%SetPattRegExp='(.*)@\n(.*)\n(.*)\n@(.*)'%-<br />%RegExpBlindMatch='%Text'%-<br />%SubPatt='2' %SubPatt='3'<br />Adapt this to your real data. <br />
			<i>23 November 2009 15:03:11, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30555/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30555/</guid>
			<pubDate>Mon, 23 Nov 2009 15:03:11 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30554/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Hey, Unfortunately no luck, adding %wrapped:<br /><br />%Wapped='%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~"' <br />or<br />%Wapped='%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~"' <br /><br />returns the exact same string as it did without %wrapped and:<br /><br />%Wapped="%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~"" <br />returns:<br />=@@@.*@@@..(.*)~~~.*~~~""<br /><br />Thanks for your help! <br />
			<i>23 November 2009 10:48:28, <a href="http://www.ritlabs.com/en/forums/">Alex Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30554/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30554/</guid>
			<pubDate>Mon, 23 Nov 2009 10:48:28 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30531/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			&lt;blush&gt;<br />I meant %Wrapped in stead of %wapped <br />
			<i>20 November 2009 19:03:39, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30531/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30531/</guid>
			<pubDate>Fri, 20 Nov 2009 19:03:39 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30530/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Unfortunately that did not work <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_sad.gif" border="0" data-code=":(" data-definition="SD" alt=":(" style="width:16px;height:16px;" title="" class="bx-smile" /><br />Sample text:<br /><br />@@@unuseful text@@@ &nbsp;<br />line1<br /><br />line2<br />~~~unuseful text~~~<br /><br />I process this with:<br /><br />%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~"<br /><br />and the output is:<br /><br />---------<br />line1<br /><br />line2<br />---------<br /><br />Tried with:<br />%Wapped='%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~"'<br />but the text in the "Preview" window just disappeared, maybe the syntax is not correct?<br /><br />tried %wapped="%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~""<br />but I got: @@@.*@@@..(.*)~~~.*~~~""<br /><br />tried %wapped=%REGEXPTEXT="@@@.*@@@..(.*)~~~.*~~~"<br />but got a blank output <br />
			<i>20 November 2009 18:10:19, <a href="http://www.ritlabs.com/en/forums/">Alex Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30530/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30530/</guid>
			<pubDate>Fri, 20 Nov 2009 18:10:19 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30527/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			I'm not sure whether it wprks, but you could try: <br />%Wapped='%REGEXPTEXT="@@@(.*)@@@"' <br />
			<i>20 November 2009 17:31:55, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30527/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30527/</guid>
			<pubDate>Fri, 20 Nov 2009 17:31:55 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Export mail to a single line</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic8846/message30523/">Export mail to a single line</a></b> <i>how to export mail body to a single line</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Hey, <br /><br />I am trying to export the result of a regex to a text file on a single line, for example:<br /><br />I have a mail with the body:<br /><br />asd@<br />123<br />678<br />@ert<br /><br />I have a manual filter with the "Export to file" option and in its template the regex:<br />%REGEXPTEXT="@@@(.*)@@@"<br /><br />This would create in the text file the filter exports to 2 lines<br /><br />123<br />678<br /><br />I am trying to get it to export both lines on a single line and interpret the new line as a single space, the desired output would be:<br /><br />123 678<br /><br />How can this be done?<br /><br />Thank you! <br />
			<i>20 November 2009 13:43:42, <a href="http://www.ritlabs.com/en/forums/">Alex Alex</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic8846/message30523/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic8846/message30523/</guid>
			<pubDate>Fri, 20 Nov 2009 13:43:42 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
	</channel>
</rss>
