<?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 matching of character variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/329752#M73828</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;can we do the same without using PRXMATCH function?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 11:47:04 GMT</pubDate>
    <dc:creator>bits</dc:creator>
    <dc:date>2017-02-03T11:47:04Z</dc:date>
    <item>
      <title>Pattern matching of character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/324358#M72003</link>
      <description>My dataset having character variable as "PANCARD" having total 10 characters and i want to extract a data from 10 thousand records using pattern matching.&lt;BR /&gt;Conditions are:-&lt;BR /&gt;1) first 5 characters should be alphabets&lt;BR /&gt;2) then 4 charcters should be numeric&lt;BR /&gt;3) last one is alphabet.&lt;BR /&gt;For example.. DHPLO9635G</description>
      <pubDate>Thu, 12 Jan 2017 18:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/324358#M72003</guid>
      <dc:creator>bits</dc:creator>
      <dc:date>2017-01-12T18:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern matching of character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/324362#M72005</link>
      <description />
      <pubDate>Thu, 12 Jan 2017 18:15:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/324362#M72005</guid>
      <dc:creator>bits</dc:creator>
      <dc:date>2017-01-12T18:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern matching of character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/324371#M72008</link>
      <description>&lt;P&gt;You didn't say what you want to do once you found a record that matched the condition. The following will find the matching records:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;&amp;nbsp; input pancard $10. x y;&lt;BR /&gt;&amp;nbsp; if prxmatch("m/[A-Z]{5}\d{4}[A-Z]/oi",pancard) &amp;gt; 0 then found=1;&lt;BR /&gt;&amp;nbsp; else found=0;&lt;BR /&gt;&amp;nbsp; cards;&lt;BR /&gt;DHPLO9635G 1 1&lt;BR /&gt;DH1LO9635G 0 0&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 19:12:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/324371#M72008</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-12T19:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern matching of character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/329752#M73828</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;can we do the same without using PRXMATCH function?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 11:47:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/329752#M73828</guid>
      <dc:creator>bits</dc:creator>
      <dc:date>2017-02-03T11:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pattern matching of character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/329803#M73839</link>
      <description>&lt;P&gt;There's often&amp;nbsp;more than one possible solution to solve a given problem with SAS. In this case you could use something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
  input pancard $10. x y;
  if (countc(substr(pancard,1,5),,'ai')+
    countc(substr(pancard,6,4),,'d')+
    countc(substr(pancard,10,1),,'ai')) eq 10 then found=1;
  else found=0;
  cards;
DHPLO9635G 1 1
DH1LO9635G 0 0
;
&lt;/PRE&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 14:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pattern-matching-of-character-variable/m-p/329803#M73839</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-03T14:50:13Z</dc:date>
    </item>
  </channel>
</rss>

