<?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 Pattern matching in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494326#M130238</link>
    <description>&lt;P&gt;You'll probably get a simple answer from someone familiar with prxmatch.&amp;nbsp; Just in case, it's easy to do without:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where SERIAL_NBR =: 'AB123X67' and ('0301' &amp;lt;= substr(SERIAL_NBR, 9, 4) &amp;lt;= '5301');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Sep 2018 21:56:12 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-09-10T21:56:12Z</dc:date>
    <item>
      <title>PRXMatch Pattern matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494325#M130237</link>
      <description>&lt;P&gt;I'm trying to write a regular expression to test serial numbers to see if they are in the correct format and numeric range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The serial numbers&amp;nbsp;should be formatted as follows&amp;nbsp;AB123X670301 to AB123X675301 where the last six digits represents a range from 670301 to 675301.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried the following code but it doesn't accomodate the range properly. Can somebody with more experience provide me with some tips?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where not prxmatch("/AB123X[670301 - 675301]/", SERIAL_NBR)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 21:48:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494325#M130237</guid>
      <dc:creator>abc1324</dc:creator>
      <dc:date>2018-09-10T21:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: PRXMatch Pattern matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494326#M130238</link>
      <description>&lt;P&gt;You'll probably get a simple answer from someone familiar with prxmatch.&amp;nbsp; Just in case, it's easy to do without:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where SERIAL_NBR =: 'AB123X67' and ('0301' &amp;lt;= substr(SERIAL_NBR, 9, 4) &amp;lt;= '5301');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 21:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494326#M130238</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-10T21:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: PRXMatch Pattern matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494333#M130240</link>
      <description>&lt;P&gt;If the prefix is constant then you can simply do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where not ("AB123X670301" &amp;lt;= SERIAL_NBR &amp;lt;= "AB123X675301");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if it isn't, then we need more information describing the legal values.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 22:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494333#M130240</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-09-10T22:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: PRXMatch Pattern matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494353#M130250</link>
      <description>&lt;P&gt;Alternatively, you could try to suppress the portion of the string which is not the actual range by prxchange as below and use the remaining portion for comparison&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The input(prxchange('s/^\w{2}\d{3}\w{1}//',-1,char),best.) will return the numeric portion i.e. the last 6 digits which is converted to numeric value by input function&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;PRE&gt;&lt;CODE class=" language-sas"&gt;SERIAL_NBR =: 'AB123X67' and not (input(prxchange('s/^\w{2}\d{3}\w{1}//',-1,char),best.) &amp;lt;= SERIAL_NBR &amp;lt;= input(prxchange('s/^\w{2}\d{3}\w{1}//',-1,char),best.) )&lt;/CODE&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, 11 Sep 2018 01:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494353#M130250</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-09-11T01:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: PRXMatch Pattern matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494928#M130517</link>
      <description>Thanks for the ideas, everyone.&lt;BR /&gt;The prefix should be consistent, however, I've found that sometimes it's included, other times it's partially included, and sometimes it's excluded altogether.&lt;BR /&gt;I'm thinking that I should 1) test to see if the prefix exists and flag those where it doesn't. 2) suppress the prefix if it does exist and then test the numeric portion to make sure that it's within the acceptable range.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Sep 2018 17:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRXMatch-Pattern-matching/m-p/494928#M130517</guid>
      <dc:creator>abc1324</dc:creator>
      <dc:date>2018-09-12T17:21:31Z</dc:date>
    </item>
  </channel>
</rss>

