<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Text parsing question in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154247#M9382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;the&amp;nbsp; woods have a bat&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;cat&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;and a rat&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 18:54:13 GMT</pubDate>
    <dc:creator>allaboutsas</dc:creator>
    <dc:date>2014-12-17T18:54:13Z</dc:date>
    <item>
      <title>Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154245#M9380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;I’m using a sample code from SAS here, want to get a different&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; ExpressionID = prxparse('/(?:s|,?)([crb]at) ?(?:,)?/');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; text = 'The woods have a bat, cat and a rat';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; start = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; stop = length(text);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Use PRXNEXT to find the first instance of the pattern, */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* then use DO WHILE to find all further instances.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* PRXNEXT changes the start parameter so that searching&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* begins again after the last match.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; call prxnext(ExpressionID, start, stop, text, position, length);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do while (position &amp;gt; 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnd = prxposn(ExpressionID,1,text);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; found = substr(text, position, length);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put fnd= found= position= length= start= stop=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call prxnext(ExpressionID, start, stop, text, position, length);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;/*The following lines are written to the SAS log:*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;/*&amp;nbsp;&amp;nbsp; found=bat position=18 length=3*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;/*&amp;nbsp;&amp;nbsp; found=cat position=23 length=3*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;/*&amp;nbsp;&amp;nbsp; found=rat position=34 length=3*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;What I want to get is this instead:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;Found=The woods have a bat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;Found= cat and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;Found= a rat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;Basically use the found-word as a delimiter to strip out the string to parts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px;"&gt;(as many as it finds, 3 in this case). &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 17:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154245#M9380</guid>
      <dc:creator>allaboutsas</dc:creator>
      <dc:date>2014-12-17T17:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154246#M9381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WWhat's your delimiter? If it was bat/cat/hat your result would be :&lt;/P&gt;&lt;P&gt;the&amp;nbsp; woods have a bat&lt;/P&gt;&lt;P&gt;cat&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;and a rat&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;or possibly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;the&amp;nbsp; woods have a bat&lt;/P&gt;&lt;P&gt;cat and a&lt;/P&gt;&lt;P&gt;rat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 18:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154246#M9381</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-17T18:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154247#M9382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;the&amp;nbsp; woods have a bat&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;cat&lt;/P&gt;&lt;P style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;and a rat&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 18:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154247#M9382</guid>
      <dc:creator>allaboutsas</dc:creator>
      <dc:date>2014-12-17T18:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154248#M9383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forget the sample code from SAS, what are you trying to accomplish overall. Can you provide more than one example? Would sat also be a delimiter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154248#M9383</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-17T19:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154249#M9384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's add to the list.&amp;nbsp; Which of these should be considered delimiters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at&lt;/P&gt;&lt;P&gt;cats&lt;/P&gt;&lt;P&gt;matter&lt;/P&gt;&lt;P&gt;Secretariat&lt;/P&gt;&lt;P&gt;wheat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 19:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154249#M9384</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-12-17T19:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154250#M9385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;I have to use prxparse('/(?:\s|,?)([crb]at) ?(?:,)?/'); which means only cat|rat|bat are delimiters(words), just notice a typo in the original post, should be \s which means space, the real program is much more complicated than this one, goal is to get substrings from the big string, in a way of breaking the string by looking at any of these 3 words (in this sample, real case is much more).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 20:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154250#M9385</guid>
      <dc:creator>allaboutsas</dc:creator>
      <dc:date>2014-12-17T20:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154251#M9386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And I know in this case a word like brat will show up, that is fine. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 20:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154251#M9386</guid>
      <dc:creator>allaboutsas</dc:creator>
      <dc:date>2014-12-17T20:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154252#M9387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, keeping your program as intact as possible ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add one statement just before DO WHILE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prior_position = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then inside the DO WHILE loop, replace FOUND= with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;found = substr(text, prior_position, position - prior_position + 3);&lt;/P&gt;&lt;P&gt;prior_position = position + 3;&lt;/P&gt;&lt;P&gt;You may get ", cat" instead of "cat", but that's probably a decent result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 20:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154252#M9387</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-12-17T20:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154253#M9388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Astounding! I think that works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 21:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154253#M9388</guid>
      <dc:creator>allaboutsas</dc:creator>
      <dc:date>2014-12-17T21:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154254#M9389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more thing, is there a way to have the last found return 'and a rat abc' instead of 'and a rat'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ExpressionID = prxparse('/(?:\s|,?)([crb]at) ?(?:,)?/');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; text = 'The woods&amp;nbsp; have a bat, cat and a rat abc';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; start = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; stop = length(text);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Use PRXNEXT to find the first instance of the pattern, */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* then use DO WHILE to find all further instances.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* PRXNEXT changes the start parameter so that searching&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* begins again after the last match.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call prxnext(ExpressionID, start, stop, text, position, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prior_position = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do while (position &amp;gt; 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnd = prxposn(ExpressionID,1,text);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; found = substr(text, prior_position, position - prior_position + length(fnd)+1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; prior_position = position + length(fnd)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put fnd= found= prior_position position= length= start= stop=;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call prxnext(ExpressionID, start, stop, text, position, length);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 21:33:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154254#M9389</guid>
      <dc:creator>allaboutsas</dc:creator>
      <dc:date>2014-12-17T21:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Text parsing question</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154255#M9390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it wouldn't be easy.&amp;nbsp; What would be easy would be to print one more line at the end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remaining text = abc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 21:45:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Text-parsing-question/m-p/154255#M9390</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2014-12-17T21:45:10Z</dc:date>
    </item>
  </channel>
</rss>

