<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/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>Parse Text String - Line Breaks</title><link>https://community.appian.com/discussions/f/user-interface/14795/parse-text-string---line-breaks</link><description>I need to parse a text string that has the following format: 
 &amp;quot;firstName 
 firstName lastName 
 companyName 
 context&amp;quot; 
 Is there a function that can identify where a linebreak is in Appian? Or a way for me to return text from a specific line in a text</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Parse Text String - Line Breaks</title><link>https://community.appian.com/thread/66222?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 15:22:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:161eae63-4c09-462d-b386-5d32e805cb4e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;What is your end goal in particular?&amp;nbsp; In such cases I&amp;#39;ve sometimes found it useful to use the &amp;quot;split&amp;quot; function and split on linebreaks, which will result in an array of items each of which being the text entries in between linebreaks (which would include blank lines, you&amp;#39;d need to deal with separately).&lt;/p&gt;
&lt;p&gt;i.e. &lt;strong&gt;split( ri!incomingText, char(10) )&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Also be aware that depending on the source of the incoming text, sometimes a linebreak will be a single &amp;quot;char(10)&amp;quot;, and sometimes each linebreak will be represented by both char(10) and char(13) (i.e. \r and \n).&amp;nbsp; Text entered directly into Appian won&amp;#39;t use char(13), but text from external sources might have it.&amp;nbsp; You might need to take this into account when implementing your solution depending on your use case and the source of your incoming text.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Parse Text String - Line Breaks</title><link>https://community.appian.com/thread/66220?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 14:24:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37e315a4-347f-4e33-bd33-ffb436bff325</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;What will you do when you&amp;#39;ve found them all?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Parse Text String - Line Breaks</title><link>https://community.appian.com/thread/66219?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 14:20:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5fb22f0e-dc74-4399-9306-00642a8c1354</guid><dc:creator>justinp821</dc:creator><description>&lt;p&gt;Hi Robert, I&amp;#39;ve tried fn!find but it looks like it only returns the first match, not every match.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Parse Text String - Line Breaks</title><link>https://community.appian.com/thread/66218?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 14:08:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fec798f6-ead4-4e17-9062-e768d19db7c1</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;fn!find(
  fn!char(10),
  &amp;quot;firstName
  
  firstName lastName
  
  companyName
  
  context&amp;quot;
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>