<?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: Prxmatch using wildcards within two literals in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623123#M183379</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data a;
input x $10.;
datalines;
ABC(123)
AZ(J11)
ABZ(7)
XYZ123
XYY(1B1)
;
run;

data b;
set a;
Flag= ^^prxmatch('/\([a-z0-9]{1,3}\)/i',x);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Feb 2020 17:18:42 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-02-07T17:18:42Z</dc:date>
    <item>
      <title>Prxmatch using wildcards within two literals</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623119#M183376</link>
      <description>&lt;P&gt;I want to select five character values within parentheses.&amp;nbsp; &amp;nbsp;The first of 3 characters can be a letter or number and rest should be numbers.&amp;nbsp; &amp;nbsp;This code correctly flags 'ABC(123)' but does not flag 'AZ(J11)' and incorrectly flags 'XYZ123'.&amp;nbsp; &amp;nbsp;What do I need to change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;input x $10.;&lt;BR /&gt;datalines;&lt;BR /&gt;ABC(123)&lt;BR /&gt;AZ(J11)&lt;BR /&gt;ABZ(7)&lt;BR /&gt;XYZ123&lt;/P&gt;&lt;P&gt;XYY(1B1)&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data b;&lt;BR /&gt;set a;&lt;BR /&gt;flag=0;&lt;BR /&gt;if prxmatch('/[0-9]{3}/',x) then flag=1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 16:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623119#M183376</guid>
      <dc:creator>Batman</dc:creator>
      <dc:date>2020-02-07T16:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Prxmatch using wildcards within two literals</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623122#M183378</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9248"&gt;@Batman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; if prxmatch('/\([a-z|\d]\d\d\)/i', x) then flag=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;a parenthesis&amp;nbsp;\(&lt;/P&gt;
&lt;P&gt;followed by a letter or a digit&amp;nbsp;&lt;CODE class=" language-sas"&gt;[a-z|\d] (nb: case insensitive -&amp;gt; I modifier)&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;followed by 2 digits d\d&lt;/P&gt;
&lt;P&gt;followed by a parenthesis \)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 17:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623122#M183378</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-07T17:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Prxmatch using wildcards within two literals</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623123#M183379</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data a;
input x $10.;
datalines;
ABC(123)
AZ(J11)
ABZ(7)
XYZ123
XYY(1B1)
;
run;

data b;
set a;
Flag= ^^prxmatch('/\([a-z0-9]{1,3}\)/i',x);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 17:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prxmatch-using-wildcards-within-two-literals/m-p/623123#M183379</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-07T17:18:42Z</dc:date>
    </item>
  </channel>
</rss>

