<?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: Pattern Recognition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558080#M155702</link>
    <description>&lt;P&gt;So in this example, all three records would be identified, correct?&lt;/P&gt;</description>
    <pubDate>Sat, 11 May 2019 22:29:07 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-05-11T22:29:07Z</dc:date>
    <item>
      <title>Pattern Recognition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558078#M155701</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a challenge to identify a particular pattern in the data, for example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AB, YZ&lt;/P&gt;
&lt;P&gt;AB, AB, YZ&lt;/P&gt;
&lt;P&gt;AB, AB, AB, YZ&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if string AB comes before string YZ,&amp;nbsp; i need to identify these records, but AB can be any number of times (i.e. 1 to n)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 21:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558078#M155701</guid>
      <dc:creator>SASSLICK001</dc:creator>
      <dc:date>2019-05-11T21:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern Recognition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558080#M155702</link>
      <description>&lt;P&gt;So in this example, all three records would be identified, correct?&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 22:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558080#M155702</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-05-11T22:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern Recognition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558084#M155706</link>
      <description>&lt;P&gt;Try to check by:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if scan(&amp;lt;variable namr&amp;gt;, -1, ' ,') = 'BZ' and&amp;nbsp; /* last string */&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;scan(&amp;lt;variable namr&amp;gt;, -2, ' ,') = 'AB'&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; then ...; else ...;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2019 00:20:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558084#M155706</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-05-12T00:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern Recognition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558096#M155711</link>
      <description>&lt;P&gt;Regular expressions are all about text patterns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if prxMatch("/AB[, ]+YZ/i", string) then &lt;EM&gt;&amp;lt;do something&amp;gt;&lt;/EM&gt;;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;would match your example pattern. The pattern says: AB followed by one or more comma or a space characters, followed by YZ.&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2019 02:49:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558096#M155711</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-05-12T02:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern Recognition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558101#M155717</link>
      <description>&lt;P&gt;If it is really as simple as your example then no need for regular expressions.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;index(string,'AB, YZ')&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 May 2019 04:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-Recognition/m-p/558101#M155717</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-12T04:18:09Z</dc:date>
    </item>
  </channel>
</rss>

