<?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 prxmatch, maximum number of matches not working in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560588#M156794</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am trying following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
 	input id Value $;
datalines;
1 50
2 1
3 500
4 56
5 1000
;
run;

data new1;
 	set new;
 		where prxmatch('/\d{2}/',Value);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;After submitting above code, I am getting following output:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ss.png" style="width: 268px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29685iE88595BF3A8BE7A4/image-dimensions/268x151?v=v2" width="268" height="151" role="button" title="ss.png" alt="ss.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;According to following documentation&lt;BR /&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/265-29.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/265-29.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Expected output:&lt;BR /&gt;&lt;BR /&gt;id Value&lt;BR /&gt;1 50&lt;BR /&gt;4 56&lt;BR /&gt;&lt;BR /&gt;But in output I am getting 2 digit number and greater then 2 digit number even-though &lt;BR /&gt;my pattern is only for 2 digit number &lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2019 17:35:11 GMT</pubDate>
    <dc:creator>surajmetha55</dc:creator>
    <dc:date>2019-05-21T17:35:11Z</dc:date>
    <item>
      <title>prxmatch, maximum number of matches not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560588#M156794</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am trying following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new;
 	input id Value $;
datalines;
1 50
2 1
3 500
4 56
5 1000
;
run;

data new1;
 	set new;
 		where prxmatch('/\d{2}/',Value);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;After submitting above code, I am getting following output:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ss.png" style="width: 268px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29685iE88595BF3A8BE7A4/image-dimensions/268x151?v=v2" width="268" height="151" role="button" title="ss.png" alt="ss.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;According to following documentation&lt;BR /&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/265-29.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/265-29.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Expected output:&lt;BR /&gt;&lt;BR /&gt;id Value&lt;BR /&gt;1 50&lt;BR /&gt;4 56&lt;BR /&gt;&lt;BR /&gt;But in output I am getting 2 digit number and greater then 2 digit number even-though &lt;BR /&gt;my pattern is only for 2 digit number &lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 17:35:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560588#M156794</guid>
      <dc:creator>surajmetha55</dc:creator>
      <dc:date>2019-05-21T17:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch, maximum number of matches not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560598#M156802</link>
      <description>&lt;P&gt;Your pattern matches any string that includes at least two consecutive digits. Try this instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/^\d{2}\s*$/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 17:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560598#M156802</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-21T17:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch, maximum number of matches not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560723#M156871</link>
      <description>&lt;P&gt;Tried with following changes but getting same output as shown in above screen shot. (&lt;SPAN&gt;two consecutive digits and greater then&amp;nbsp;two consecutive digits&amp;nbsp;&lt;/SPAN&gt;)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where prxmatch('/\d{2}\s*$/',Value);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 06:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560723#M156871</guid>
      <dc:creator>surajmetha55</dc:creator>
      <dc:date>2019-05-22T06:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch, maximum number of matches not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560725#M156872</link>
      <description>&lt;P&gt;Interesting, i get the expected results:&lt;/P&gt;
&lt;PRE&gt;36         data new1;
37            set new;
38            where prxmatch('/^\d{2}\s*$/', Value);
39            put _all_;
40         run;

id=1 Value=50 _ERROR_=0 _N_=1
id=4 Value=56 _ERROR_=0 _N_=2
NOTE: There were 2 observations read from the data set WORK.NEW.
      WHERE PRXMATCH('/^\d{2}\s*$/', Value);
&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 May 2019 06:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560725#M156872</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-05-22T06:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch, maximum number of matches not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560754#M156889</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/237008"&gt;@surajmetha55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The devil is in the detail. You omitted the little caret-symbol ^ from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;'s code.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 10:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch-maximum-number-of-matches-not-working/m-p/560754#M156889</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-05-22T10:27:33Z</dc:date>
    </item>
  </channel>
</rss>

