<?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: Exclusion in PRXMATCH ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631616#M187159</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp; Please check if this works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data datain;
      infile datalines dsd;
  input Name : $300. ;
datalines;
	0001234,
	SUB0001031,
	NCV0001234,
	CARID0001070,
	;
run;
data want;
 set datain;
 where not prxmatch ('/^(SUB|NCV)/i',name);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Mar 2020 15:40:51 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-03-12T15:40:51Z</dc:date>
    <item>
      <title>Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631366#M187070</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to exclude the 'SUB' and 'NCV' in the PRXMATCH command.&amp;nbsp; I have the code below.&amp;nbsp;&amp;nbsp; I found the texts are still in the result TEMPID.&amp;nbsp; Please help.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; if prxmatch ('/000|^SUB|^NCV/i',id) then TempID=id;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2020 20:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631366#M187070</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-03-11T20:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631374#M187073</link>
      <description>&lt;P&gt;I'm not entirely sure what you want to do here. Your code matches string that contain '000' or starts with either 'sub' or 'ncv' (case insensitive).&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 20:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631374#M187073</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-03-11T20:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631380#M187077</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp; Not sure your objective,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you are saying something like below is what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; if id = '000' or id not in  ('SUB','NCV') then tempid=id;/*assuming you want this*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is literally equivalent to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; if  id not in  ('SUB','NCV') then tempid=id;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which basically is equivalent to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if not prxmatch ('/SUB|NCV/i',id) then TempID=id;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 21:13:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631380#M187077</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-11T21:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631429#M187091</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to exclude the 'SUB' and 'NCV' in the PRXMATCH command.&amp;nbsp; I have the code below.&amp;nbsp;&amp;nbsp; I found the texts are still in the result TEMPID.&amp;nbsp; Please help.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; if prxmatch ('/000|^SUB|^NCV/i',id) then TempID=id;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please provide some sample data and then show us the desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your RegEx: Do you by any chance believe the ^ has a meaning of NOT?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;^abc&amp;nbsp; &amp;nbsp; &amp;nbsp; Here the ^ means beginning of string so strings starting with &lt;EM&gt;abc&lt;/EM&gt; will match.&lt;/P&gt;
&lt;P&gt;[^abc]&amp;nbsp; &amp;nbsp; Here the ^ has the meaning of NOT and string containing a, b, or c anywhere will not match&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 01:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631429#M187091</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-12T01:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631615#M187158</link>
      <description>&lt;P&gt;Below is my sample dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datain;
      infile datalines dsd;
  input Name : $300. ;
datalines;
	0001234,
	SUB0001031,
	NCV0001234,
	CARID0001070,
	;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The final result I want is 0001234 and CARID0001070.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:36:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631615#M187158</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-03-12T15:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631616#M187159</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp; Please check if this works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data datain;
      infile datalines dsd;
  input Name : $300. ;
datalines;
	0001234,
	SUB0001031,
	NCV0001234,
	CARID0001070,
	;
run;
data want;
 set datain;
 where not prxmatch ('/^(SUB|NCV)/i',name);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631616#M187159</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-12T15:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Exclusion in PRXMATCH ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631716#M187188</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where NAME not in: ('SUB','NCV') and index(NAME,'000');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 21:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclusion-in-PRXMATCH/m-p/631716#M187188</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-12T21:53:39Z</dc:date>
    </item>
  </channel>
</rss>

