<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: Problem with script regex and match ...]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in Problem with script regex and match ... of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Fri, 17 Jul 2009 22:44:27 +0300</lastBuildDateTag>		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29381/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			lemo nico, my email adress: konrad_sz@wp.pl<br /><br />I think this (or any) forum is not the best place to present templates: sometime empty lines, important spaces or new lines disappears in html.<br /><br />Please, send me some examples of Your orders, and tell me exactly which fields are optional and how much orders in one mail could be (if more than 10 I would recommend template with a 'loop' macro from XMP or MyMacros plugin). <br />
			<i>17 July 2009 22:44:27, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29381/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29381/</guid>
			<pubDate>Fri, 17 Jul 2009 22:44:27 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29380/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			<b>K_S!</b> <br />thanks a lot one more time &nbsp;♥♥♥♥♥♥♥♥♥♥ <br /><br />I have tried it, it works nearly perfect &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_biggrin.gif" border="0" data-code=":D" data-definition="SD" alt=":D" style="width:16px;height:16px;" title="" class="bx-smile" />.<br />my last problem: I get always some "█" (tabs) &nbsp;ant the invoices look horrible <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_evil.gif" border="0" data-code=":evil:" data-definition="SD" alt=":evil:" style="width:16px;height:16px;" title="" class="bx-smile" /> :<br /><br /><br />first Quantity █x<br />first Name___xxxxxx<br />first Reference________xxxxxx<br />Optionen : &nbsp; &nbsp; &nbsp;<br />first Price <br />first reduced &nbsp; &nbsp; &nbsp; <br />Steuern :_______xxxxxx<br />first total______xxxxxx Ђ<br /><br /><br />second Quantity_______x<br />("_" represent the different distances between the felds).<br /><br />since I can not put tabs in the template in order to recognise the fields, I do not know how can I get ride of them <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 />Till know I use the folowing template:<br />%SETPATTREGEXP="(?i-s)^Menge :\s(.*)$|\z"%-%REGEXPBLINDMATCH="%text"%-%SUBPATT="1"%-<br />in order to get the result of the field "Menge :"<br /><br />in fact the originality the fields look like: <br /><br />Menge : 2<br />Name : &nbsp;Thebat Pro V9<br />Katalognummer : TBV9<br />Optionen : &nbsp; &nbsp; &nbsp;Voyager<br />Preis : 9,50 Ђ<br />Herabgesetzt auf : &nbsp; &nbsp;4,50 Ђ &nbsp;<br />Steuern : &nbsp; &nbsp; &nbsp; 1,44 Ђ<br />Zwischensumme : 9,00 Ђ<br /><br />for your info here is the translation German &lt;-&gt; english:<br />Menge &lt;-&gt; Quantity<br />Herabgesetzt auf &lt;-&gt; reduced<br />Steuern &lt;-&gt; Tax<br />Zwischensumme &lt;-&gt; first total<br /><br />And I need to get the following result in order to print it in only one page even if 20 products are ordered:<br /><br />"Menge" "Katalognummer" "Name"<br />"Optionen (if present)<br />"Preis" "Herabgesetzt auf" (if present) "Steuern" "Zwischensumme"<br /><br />2 x TBV9 Thebat Pro V9<br />Option : Voyager<br />Preis stück : 9,50 Ђ, Herabgesetzt auf : 4,50 Ђ, inklusive Steuer : 1,44 Ђ, Zwischensumme : 9 ,00 Ђ<br /><br />so that we don t need 20 pages to print the order <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_wink.gif" border="0" data-code=";)" data-definition="SD" alt=";)" style="width:16px;height:16px;" title="" class="bx-smile" /><br /><br />With your template the field "Optionen :" block the template to extract the name of the product...<br /><br />I would like to send U the Email I get in order to show U how they look like ?<br /><br />Please write me your Email in your profile (you can use for this <noindex><a href="http://www.jetable.org/en/index" target="_blank" rel="nofollow">http://www.jetable.org/en/index</a></noindex> in order to avoid spam) that will give me also the possibility to send U a small "thank U". &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_wink.gif" border="0" data-code=";)" data-definition="SD" alt=";)" style="width:16px;height:16px;" title="" class="bx-smile" /> <br />
			<i>17 July 2009 19:21:51, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29380/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29380/</guid>
			<pubDate>Fri, 17 Jul 2009 19:21:51 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29358/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Try this regexp:<br />
====code====
<pre>%SETPATTREGEXP="(?is)(^Quantity : )(.*?)&#92;n%-
(^Name : )(.*?)&#92;n%-
(^Reference : )(.*?)&#92;n%-
(^Price : )(.*?)&#92;n%-
((^reduced to : )(.*?)&#92;n)?%-
(^total line : )(.*?)&#92;n%-
(.*?&#92;1(.*?)&#92;n&#92;3(.*?)&#92;n&#92;5(.*?)&#92;n&#92;7(.*?)&#92;n(&#92;10(.*?)&#92;n)?&#92;12(.*?)&#92;n)?%-
(.*?&#92;1(.*?)&#92;n&#92;3(.*?)&#92;n&#92;5(.*?)&#92;n&#92;7(.*?)&#92;n(&#92;10(.*?)&#92;n)?&#92;12(.*?)&#92;n)?%-
(.*?&#92;1(.*?)&#92;n&#92;3(.*?)&#92;n&#92;5(.*?)&#92;n&#92;7(.*?)&#92;n(&#92;10(.*?)&#92;n)?&#92;12(.*?)&#92;n)?%-
"%-
%REGEXPBLINDMATCH="%TEXT"%-

first Quantity %SUBPATT(2)
first Name %SUBPATT(4)
first Reference %SUBPATT(6)
first Price %SUBPATT(8)
%IF:'%SUBPATT(9)'&#60;&#62;'':'first reduced %SUBPATT(11)'
first total %SUBPATT(13)

%IF:'%SUBPATT(14)'&#60;&#62;'':'
second Quantity %SUBPATT(15)
second Name %SUBPATT(16)
second Reference %SUBPATT(17)
second Price %SUBPATT(18)
%IF:`%SUBPATT(19)`&#60;&#62;``:`second reduced %SUBPATT(20)`
second total %SUBPATT(21)
'%-

%IF:'%SUBPATT(22)'&#60;&#62;'':'
third Quantity %SUBPATT(23)
third Name %SUBPATT(24)
third Reference %SUBPATT(25)
third Price %SUBPATT(26)
%IF:`%SUBPATT(27)`&#60;&#62;``:`third reduced %SUBPATT(28)`
third total %SUBPATT(29)
'%-

%IF:'%SUBPATT(30)'&#60;&#62;'':'
fourth Quantity %SUBPATT(31)
fourth Name %SUBPATT(32)
fourth Reference %SUBPATT(33)
fourth Price %SUBPATT(34)
%IF:`%SUBPATT(35)`&#60;&#62;``:`fourth reduced %SUBPATT(36)`
fourth total %SUBPATT(37)
'%-
</pre>
=============
<br /><br />====quote====<br />Tell me also How can I thank U<br />=============<br />&lt;voice mode='Terminator' ON&gt;No problemo&lt;voice OFF&gt; <br />
			<i>15 July 2009 23:02:41, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29358/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29358/</guid>
			<pubDate>Wed, 15 Jul 2009 23:02:41 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29351/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			oh oh I have talk to fast &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br />in fact with this template I get all the Name<br /><br />so for my exemple I get<br /><br />The Bat! Pro Edition V9.9<br />The Bat! Voyager V9.9<br />The Bat! Private Disk V9.9 <br /><br />but what is about the other field ?<br /><br />Quantity :<br />Reference :<br />Price :<br />reduced to :<br />total line :<br /><br />?<br /><br />I suppose we should here mare some other SUBPATT(...)<br /><br />I have tried to mix the progammation, change the line and so on, but without success <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_evil.gif" border="0" data-code=":evil:" data-definition="SD" alt=":evil:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br />I know it a hard challenge but the possibility of such a template is really a dream !!!<br /><br />Tell me also How can I thank U, send me your Email for ex. because U R really my saviour &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_kiss.gif" border="0" data-code=":{}" data-definition="SD" alt=":{}" style="width:16px;height:16px;" title="" class="bx-smile" /> <br />
			<i>15 July 2009 14:51:35, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29351/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29351/</guid>
			<pubDate>Wed, 15 Jul 2009 14:51:35 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29349/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			KOOOL !!! KS you are the best ! <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 />how can I thank U ????<br /><br /><br /> <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_kiss.gif" border="0" data-code=":{}" data-definition="SD" alt=":{}" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_kiss.gif" border="0" data-code=":{}" data-definition="SD" alt=":{}" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_kiss.gif" border="0" data-code=":{}" data-definition="SD" alt=":{}" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_kiss.gif" border="0" data-code=":{}" data-definition="SD" alt=":{}" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_kiss.gif" border="0" data-code=":{}" data-definition="SD" alt=":{}" style="width:16px;height:16px;" title="" class="bx-smile" /> <br />
			<i>15 July 2009 14:01:25, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29349/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29349/</guid>
			<pubDate>Wed, 15 Jul 2009 14:01:25 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29332/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Lemo nico, I don't understand, in Your first message email format was different and my regexp worked. Maybe there are some spaces (at the begining of the line) or empty lines in real emails?<br /><br />If e-mails looks like in Your newest message, then a simple template to catch names of products could looks like that (this will catch max 7 names):<br />
====code====
<pre>%SETPATTREGEXP="(?is)(^Name :&#92;s)(.*?)&#92;n%-
(.*?&#92;1(.*?)&#92;n)?%-
(.*?&#92;1(.*?)&#92;n)?%-
(.*?&#92;1(.*?)&#92;n)?%-
(.*?&#92;1(.*?)&#92;n)?%-
(.*?&#92;1(.*?)&#92;n)?%-
"%-
%REGEXPBLINDMATCH="%TEXT"%-
%SUBPATT(2)%-
%IF:'%SUBPATT(4)'&#60;&#62;'':' and %SUBPATT(4)'%-
%IF:'%SUBPATT(6)'&#60;&#62;'':' and %SUBPATT(6)'%-
%IF:'%SUBPATT(8)'&#60;&#62;'':' and %SUBPATT(8)'%-
%IF:'%SUBPATT(10)'&#60;&#62;'':' and %SUBPATT(10)'%-
%IF:'%SUBPATT(12)'&#60;&#62;'':' and %SUBPATT(12)'%-
%IF:'%SUBPATT(14)'&#60;&#62;'':' and %SUBPATT(14)'%-</pre>
============= <br />
			<i>14 July 2009 17:04:57, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29332/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29332/</guid>
			<pubDate>Tue, 14 Jul 2009 17:04:57 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message29325/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			<b>Roelof Otten!</b>,<br /><b>K_S!</b>, <br />I try and retry your proposal, and try also to modify it (I am an inexperienced Templatemaker &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_redface.gif" border="0" data-code=":oops:" data-definition="SD" alt=":oops:" style="width:16px;height:16px;" title="" class="bx-smile" /> ) but I only managed to get the first product &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br />In fact I am working with a Webshop and I get the order in emails. I rewrite each order in invoice and lose too much time.<br />My dream: TheBat get the info and put print it with templates.<br /><br />The Email looks like that:<br /><br />Quantity : 2<br />Name : &nbsp;The Bat! Pro Edition V9.9<br />Reference : TBP9.9<br />Price : $45.00<br />reduced to : $39.00 &nbsp; &nbsp; <br />total line : $78,00<br /><br />Quantity : 1<br />Name : &nbsp;The Bat! Voyager V9.9<br />Reference : TBV9.9<br />Price : $15.00<br />reduced to : $9.00 &nbsp; &nbsp; <br />total line : $9.00<br /><br />Quantity : 1<br />Name : &nbsp;The Bat! Private Disk V9.9<br />Reference : TBPD9.9<br />Price : $19.00<br />total line : $19.00<br /><br />I have been trying and trying but without success <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br />Hopping a programming god could help me here <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_exclaim.gif" border="0" data-code=":!:" data-definition="SD" alt=":!:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br />
			<i>14 July 2009 13:53:29, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message29325/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message29325/</guid>
			<pubDate>Tue, 14 Jul 2009 13:53:29 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message19073/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			thanks a lot <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 try it and say you the way its go &nbsp; <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_wink.gif" border="0" data-code=";)" data-definition="SD" alt=";)" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp; <br />
			<i>21 August 2007 23:16:10, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message19073/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message19073/</guid>
			<pubDate>Tue, 21 Aug 2007 23:16:10 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message19047/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			I hate www forums... Code from my previus message is broken. Before each number in %SETPATTREGEXP should be an \\ (backslash). <br />
			<i>20 August 2007 16:01:33, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message19047/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message19047/</guid>
			<pubDate>Mon, 20 Aug 2007 16:01:33 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message19046/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			I think recursive template is too complicated solution. Regexp is faster. If You have only a few lines with 'Product : sth' in email (for example no more than 10) You could use this regexp:<br /><br />
====code====
<pre>
%SETPATTREGEXP="(?i-s)(^Product :&#92;s)(.*)(&#92;n|&#92;z)(&#92;1(.*)&#92;3)?(&#92;1(.*)&#92;3)?"%-
%REGEXPBLINDMATCH="%TEXT"%-
%SUBPATT(2)%-
%IF:'%SUBPATT(5)'&#60;&#62;'':' and %SUBPATT(5)'%-
%IF:'%SUBPATT(7)'&#60;&#62;'':' and %SUBPATT(7)'%-
</pre>
=============
<br /><br />This will catch three 'Product' lines, but I hope You see how it works and know how to expand this. <br />
			<i>20 August 2007 15:52:20, <a href="http://www.ritlabs.com/en/forums/">K_S</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message19046/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message19046/</guid>
			<pubDate>Mon, 20 Aug 2007 15:52:20 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message18992/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			I'm a bit short on time currently, so you've got to wait. But maybe somebody else feels like having a go at it. <br />
			<i>17 August 2007 12:40:10, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message18992/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message18992/</guid>
			<pubDate>Fri, 17 Aug 2007 12:40:10 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message18979/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			&nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br />Hello &nbsp;Roelof Otten,<br /><br />I have tried, tried, tried but din not managed &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_redface.gif" border="0" data-code=":oops:" data-definition="SD" alt=":oops:" style="width:16px;height:16px;" title="" class="bx-smile" /> <br /><br /><br />The challenge is too big for me &nbsp;<img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_cry.gif" border="0" data-code=":cry:" data-definition="SD" alt=":cry:" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp; <br />
			<i>16 August 2007 19:00:52, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message18979/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message18979/</guid>
			<pubDate>Thu, 16 Aug 2007 19:00:52 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message17557/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Thanks a lot for the tip,<br /><br />I ll try to write the template and inform you about the result (in fact it is a big challenge for me since I am &nbsp; &nbsp; a beginner <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_neutral.gif" border="0" data-code=":|" data-definition="SD" alt=":|" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp;in QT) &nbsp;. <br /><br />one more time thanks a lot. &nbsp; <br />
			<i>01 May 2007 13:39:08, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message17557/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message17557/</guid>
			<pubDate>Tue, 01 May 2007 13:39:08 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message17543/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			You need a recursive quick template: a template that calls itself.<br />Without writing the template for you (otherwise there'd be no challenge left for you, would there?) here are some things, you'll need to address for this.<br />Call your QT SearchForProductItems, that's a nice distinctive name.<br />Use the %_SFPI_ prefix for all parameters, like %_SFPI_Counter, %_SFPI_Result, %_SFPI_SearchText, %_SFPI_Output, etc. This way you don´t have to take care that you´re using parameters with the same name as the template that calls the first QT.<br />First thing your template has to do is check whether you´re running it for the first pass or not, that´s why you use a counter. The first pass sets your counter to 1 and sets your searchtext to equal %Text.<br />Next your QT extracts the first product, enters that value in the Result parameter and sets the the rest of your searchtext as yur new searchtext.<br />Something like this±<br />%SetPattRegExp="(?is)Product:\s(.*?)\n(.*)"%-<br />%RegExpBlindMatch="%_SFPI_SearchText"%-<br />%_SFPI_Result='%SubPatt="1"'%-<br />%_SFPI_SearchText='%SubPatt="2"'%-<br />Now you check whether your result is empty or not. If it's empty then you stop processing the text. If it's not empty then you add the result to your output parameter and call the QT again. As it isn't the first time your QT is called, your counter has a value and so your template will 'know' that you've got a truncated searchtext and will use that.<br /><br />I hope this makes things a bit clear.<br />An example of a recursive template can be found here: <noindex><a href="http://cgi.silverstones.com/library.php#greet_all_recipients" target="_blank" rel="nofollow">http://cgi.silverstones.com/library.php#greet_all_recipients</a></noindex><br /> <br />
			<i>30 April 2007 18:40:29, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message17543/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message17543/</guid>
			<pubDate>Mon, 30 Apr 2007 18:40:29 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Problem with script regex and match ...</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic4587/message17542/">Problem with script regex and match ...</a></b> <i>Templates and Macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			hello, <br /><br />I use 100 times a day such a template:<br /> %SETPATTREGEXP="(?i-s)^BProduct :\s(.*)$|\z"%-%REGEXPBLINDMATCH="%text"%-<br /><br />in order to make automatic answer of my forms like:<br /><br />Original email from a form:<br /><br />Contact: Mr beam<br />Email: beam@blabla.com<br />Product : book of linux<br />Product : book of window<br /><br />My answer is:<br /><br />Dear Mr beam, please find enclose more information about the book of linux.<br /><br />And I would like to have:<br /><br />Dear Mr beam, please find enclose more information about the book of linux and the book of window.<br /><br />That forI am using a template like &nbsp;<br />%SETPATTREGEXP="(?i-s)^BProduct :\s(.*)$|\z"%-%REGEXPBLINDMATCH="%text"%-<br /><br />My problem is: how can I configure my template in order to get the second chain of Product “book of window“, indeed since it has the same name as the first chain “Product :” book of linux I always get only the first regex (book of linux) and I can not get the book of window In my answer.<br /><br />How do I do this ?<br /><br />Many thanks in advance. <br />
			<i>30 April 2007 16:26:30, <a href="http://www.ritlabs.com/en/forums/">lemo nico</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic4587/message17542/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic4587/message17542/</guid>
			<pubDate>Mon, 30 Apr 2007 16:26:30 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
	</channel>
</rss>
