<?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: finding matches for a long list of patterns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/461168#M117272</link>
    <description>&lt;P&gt;I'm not that familiar with regex so I would suggest reposting this specifically and asking for efficiency, if you already have not.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a way to speed it up so that SAS is not resolving the prx every time but I don't know enough to illustrate it.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 May 2018 19:29:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-05-09T19:29:18Z</dc:date>
    <item>
      <title>finding matches for a long list of patterns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/460191#M116959</link>
      <description>&lt;P&gt;I have a long list of patterns that I need to check to see if there are matches in my data.&lt;BR /&gt;Which function do you recommend that would be the quickest to create code for checking for a long list of patterns?&lt;BR /&gt;Types of patterns I'm interested in matching are:&lt;BR /&gt;122Y[digit 0-9]P68A&lt;BR /&gt;12811[digit 0-9][digit 0-9]E&lt;BR /&gt;13559[digit 0-9][digit 0-9]&lt;BR /&gt;65G101[digit 0-9][digit 0-9]&lt;BR /&gt;F6364[digit 0-9][digit 0-9]-66[letter A-Z]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 21:54:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/460191#M116959</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2018-05-04T21:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: finding matches for a long list of patterns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/460197#M116963</link>
      <description>&lt;P&gt;Regex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/datastep/perl_regexp/regexp-tip-sheet.pdf" target="_blank"&gt;https://support.sas.com/rnd/base/datastep/perl_regexp/regexp-tip-sheet.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 22:32:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/460197#M116963</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-04T22:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: finding matches for a long list of patterns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/460836#M117164</link>
      <description>&lt;P&gt;Thank you. This macro seems to work well.&lt;/P&gt;&lt;P&gt;Do you have any more advice with regards to using&amp;nbsp;regex functions with a long list of patterns?&lt;/P&gt;&lt;P&gt;In addition to creating a long list of patterns to check, the list of values I'm checking for these patterns is &amp;gt;700,000.&lt;/P&gt;&lt;P&gt;Any advice for improving efficiency would be appreciated.&lt;/P&gt;&lt;P&gt;%macro prx(pattern);&lt;BR /&gt;b=prxparse("&amp;amp;pattern");&lt;BR /&gt;if prxmatch(b,serial_number)&amp;gt;0 then check=1;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;%prx(/^2C1522[\d][\d]$/);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 20:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/460836#M117164</guid>
      <dc:creator>gzr2mz39</dc:creator>
      <dc:date>2018-05-08T20:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: finding matches for a long list of patterns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/461168#M117272</link>
      <description>&lt;P&gt;I'm not that familiar with regex so I would suggest reposting this specifically and asking for efficiency, if you already have not.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a way to speed it up so that SAS is not resolving the prx every time but I don't know enough to illustrate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 19:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/finding-matches-for-a-long-list-of-patterns/m-p/461168#M117272</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-09T19:29:18Z</dc:date>
    </item>
  </channel>
</rss>

