<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: replace linebreaks with another string</title><link>https://www.infopathdev.com:443/forums/thread/66214.aspx</link><pubDate>Fri, 29 Apr 2011 13:43:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66214</guid><dc:creator>jlibrizzi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66214.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=66214</wfw:commentRss><description>I found the answer in another post by user Qwerty.&lt;br /&gt;&lt;br /&gt;
Set the default value for textfield2 = textfield1 (this prevents the original data from being overwritten)&lt;br /&gt;&lt;br /&gt;
Then run the following rule on textfield2:&lt;br /&gt;
   if textfield2 contacts @crlf&lt;br /&gt;
   concat(substring-before(textfield2, @crlf), &amp;quot;XXXX&amp;quot;, substring-after(textfield2, @crlf))&lt;br /&gt;&lt;br /&gt;
It continues to cycle through textfield2 until each linebreak is replaced.&lt;br /&gt;&lt;br /&gt;Thanks Qwerty!!!!</description></item><item><title>replace linebreaks with another string</title><link>https://www.infopathdev.com:443/forums/thread/66212.aspx</link><pubDate>Fri, 29 Apr 2011 12:50:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66212</guid><dc:creator>jlibrizzi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66212.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=66212</wfw:commentRss><description>I have a form with two fields.  The intent is that a user can paste data into textfield1, and textfield2 will rewrite and reformat it in such a way that it can be reused in another application.  I&amp;#39;ve been able to successfully alter everything except when the data in textfield1 has linebreaks.  I need:&lt;br /&gt;
string1&lt;br /&gt;
string2&lt;br /&gt;
string3&lt;br /&gt;
to be rewritten in textfield2 as &amp;quot;string1XXXstring2XXXstring3&amp;quot;.&lt;br /&gt;&lt;br /&gt;
translate(textfield1,@crlf,&amp;quot;XXX&amp;quot;) won&amp;#39;t work since translate is one-to-one characters.&lt;br /&gt;Any solutions are greatly appreciated, no code solutions even more so!</description></item></channel></rss>