<?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: Prxparse in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726722#M225863</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input x $10.;
if prxmatch('/^4\d{6}$/',strip(x)) then found=1;
cards;
1234567890
3232ywrer67
4wewe786834
4586888
45678213
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Mar 2021 12:31:41 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-03-16T12:31:41Z</dc:date>
    <item>
      <title>Prxparse</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726709#M225852</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find data that is 7 digits long and start with the number 4.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
if not prxId then prxId + prxParse("/\d{7}\/");
set CV_misscr14;
start = 1;
stop = length(aj_text);
call prxNext(prxID, start, stop, aj_text, pos, len);
do while (pos &amp;gt; 0);
    cmaenum = input(prxPosn(prxId, 1, aj_text), best.);
    output;
    call prxNext(prxID, start, stop, aj_text, pos, len);
    end;
/*drop prxId start stop pos len;*/
run;&lt;/PRE&gt;
&lt;P&gt;What do I need to change here for it to search for that?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 11:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726709#M225852</guid>
      <dc:creator>Kiteulf</dc:creator>
      <dc:date>2021-03-16T11:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Prxparse</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726722#M225863</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input x $10.;
if prxmatch('/^4\d{6}$/',strip(x)) then found=1;
cards;
1234567890
3232ywrer67
4wewe786834
4586888
45678213
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Mar 2021 12:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726722#M225863</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-03-16T12:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Prxparse</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726730#M225867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35213"&gt;@Kiteulf&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your DO loop suggests that you anticipate the possibility of more than one match per value of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;aj_text&lt;/FONT&gt;. In this case just correct the regular expression to&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/4\d{6}/&lt;/PRE&gt;
&lt;P&gt;and the second argument of the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n1lru1b4uoogqvn1ig446q4c6muu.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PRXPOSN function&lt;/A&gt; to &lt;FONT face="courier new,courier"&gt;0&lt;/FONT&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then from, say,&lt;/P&gt;
&lt;PRE&gt;aj_text='3.1&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;159265&lt;/FONT&gt;3589793238&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;626433&lt;/FONT&gt;8327950288&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;197169&lt;/FONT&gt;39937510582097&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;944592&lt;/FONT&gt;307816&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;062862&lt;/FONT&gt;0899862803&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;825342&lt;/FONT&gt;11706'&lt;/PRE&gt;
&lt;P&gt;you would obtain&lt;/P&gt;
&lt;PRE&gt;cmaenum

4159265
4626433
4197169
4944592
4062862
4825342&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Mar 2021 12:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prxparse/m-p/726730#M225867</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-03-16T12:59:06Z</dc:date>
    </item>
  </channel>
</rss>

