<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726980#M226006</link>
    <description>Thank you,&lt;BR /&gt;I still dont understand what is this condition :  prxmatch('/ttt\d{8}/i',MEMNAME) &lt;BR /&gt;I expect that when there is condition then we should have equal sign "="  and here there is no equal sign.&lt;BR /&gt;May you please write in words what is the meaning of this condition :prxmatch('/ttt\d{8}/i',MEMNAME)</description>
    <pubDate>Wed, 17 Mar 2021 05:26:23 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2021-03-17T05:26:23Z</dc:date>
    <item>
      <title>prxmatch</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726635#M225816</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I would like to ask 2 questions please:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question 1:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;prxmatch('/ttt\d{8}/i',MEMNAME)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does it mean ?&lt;/P&gt;
&lt;P&gt;As I see it tells to take data sets names that have the word "ttt"?&lt;/P&gt;
&lt;P&gt;What does it mean&amp;nbsp;d{8}/i'???&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question 2:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt; input("&amp;amp;start",DDMMYY8.) &amp;lt;= input(compress(MEMNAME,,'a'),DDMMYY8.) &amp;lt;= input("&amp;amp;end",MMDDYY8.);&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;As I understand the date in data set name should be between start and end.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What does it mean&amp;nbsp; input(compress(MEMNAME,,'a'),DDMMYY8.)??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I understand that input (......,DDMMYY8.) convert char to SAS date.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;compress deleting spaces, what&amp;nbsp;'a' is doing?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is it&amp;nbsp;&lt;SPAN&gt;removing all upper and lower case characters from String (and only numbers left)?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;thank you&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&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;
&lt;P&gt;and prxmatch('/ttt\d{8}/i',MEMNAME) &lt;BR /&gt;and input("&amp;amp;start",DDMMYY8.) &amp;lt;= input(compress(MEMNAME,,'a'),DDMMYY8.) &amp;lt;= input("&amp;amp;end",MMDDYY8.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ttt01032021;
input x y;
cards;
1 10
;
run;

data ttt02032021;
input x y;
cards;
2 11
;
run;

data ttt03032021;
input x y;
cards;
5 18
;
run;

data ttt06032021;
input x y;
cards;
6 16
;
run;


data ttt08032021;
input x y;
cards;
7 19
;
run;

%let start=01032021;
%let end=06032021;

proc sql noprint;
select MEMNAME into :ds separated by ' '
from dictionary.tables
where LIBNAME = 'WORK' 
and prxmatch('/ttt\d{8}/i',MEMNAME) 
and input("&amp;amp;start",DDMMYY8.) &amp;lt;= input(compress(MEMNAME,,'a'),DDMMYY8.) &amp;lt;= input("&amp;amp;end",MMDDYY8.);
quit;
%put &amp;amp;ds;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Mar 2021 06:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726635#M225816</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-03-16T06:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726645#M225818</link>
      <description>&lt;P&gt;As always, make use of the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0bj9p4401w3n9n1gmv6tfshit9m.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PRXMATCH Function&lt;/A&gt;&amp;nbsp;(from there, go to&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0s9ilagexmjl8n1u7e1t1jfnzlk.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Tables of Perl Regular Expression (PRX) Metacharacters&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;-&amp;gt; you will see that \d{8} searches for 8 consecutive digits, and /i means "case insensitive"&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0fcshr0ir3h73n1b845c4aq58hz.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;COMPRESS Function&lt;/A&gt;&amp;nbsp;(the modifier "a")&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 08:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726645#M225818</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-16T08:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726980#M226006</link>
      <description>Thank you,&lt;BR /&gt;I still dont understand what is this condition :  prxmatch('/ttt\d{8}/i',MEMNAME) &lt;BR /&gt;I expect that when there is condition then we should have equal sign "="  and here there is no equal sign.&lt;BR /&gt;May you please write in words what is the meaning of this condition :prxmatch('/ttt\d{8}/i',MEMNAME)</description>
      <pubDate>Wed, 17 Mar 2021 05:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726980#M226006</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-03-17T05:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726982#M226008</link>
      <description>&lt;P&gt;So probably&amp;nbsp;prxmatch('/ttt\d{8}/i',MEMNAME)&amp;nbsp; is equivalent to&amp;nbsp;prxmatch('/ttt\d{8}/i',MEMNAME) =1&amp;nbsp; ??&lt;/P&gt;
&lt;P&gt;Why is it like that??&lt;/P&gt;
&lt;P&gt;How SAS guess that&amp;nbsp;prxmatch('/ttt\d{8}/i',MEMNAME)&amp;nbsp; &amp;nbsp;is&amp;nbsp; =1??&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 05:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/726982#M226008</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-03-17T05:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/727006#M226024</link>
      <description>&lt;P&gt;You really, really, really need to start studying the documentation. It's all in there:&lt;/P&gt;
&lt;H1 id="n0bj9p4401w3n9n1gmv6tfshit9m" class="xisDoc-title"&gt;PRXMATCH Function&lt;/H1&gt;
&lt;P class="xisDoc-shortDescription"&gt;Searches for a pattern match and returns the position at which the pattern is found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To illustrate this, run a short example (Maxim 4):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input memname $32.;
pmatch = prxmatch('/ttt\d{8}/i',MEMNAME);
datalines;
xxx
ttt
ttt20210315
TTT20210315
ttt202103159
xxxttt20210315
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can see the returned positions.&lt;/P&gt;
&lt;P&gt;Since SAS considers any numeric value not in (.,0) as true, the function can be used as the sole argument to a condition.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 07:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/727006#M226024</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-17T07:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: prxmatch</title>
      <link>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/727017#M226034</link>
      <description>&lt;P&gt;It's not that you don't understand prxmatch, it's just that you don't understand that the notation 'and prxmatch('/ttt\d{8}/i',MEMNAME)' is a condition.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;prxmatch('/ttt\d{8}/i',MEMNAME)&amp;nbsp; equal&lt;/P&gt;
&lt;P&gt;prxmatch('/ttt\d{8}/i',MEMNAME) not in (. 0).&lt;/P&gt;
&lt;P&gt;both of them is the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 08:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/prxmatch/m-p/727017#M226034</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-03-17T08:18:12Z</dc:date>
    </item>
  </channel>
</rss>

