<?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: count the number of most occuring consecutive character in string in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258120#M18058</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x='aaccbdaaaccc';
length str max_str  $ 200;
pid=prxparse('/(\w)\1*/');
start=1;
stop=length(x);
max_len=0;
call prxnext(pid,start,stop,x,p,l);
do while(p&amp;gt;0);
 str=substr(x,p,l);
 len=length(str);
 if str not =: 'a' and len gt max_len then do;
  max_str=str;
  max_len=len;
 end;
 call prxnext(pid,start,stop,x,p,l);
end;
putlog max_str= max_len= ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Mar 2016 02:50:09 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-03-22T02:50:09Z</dc:date>
    <item>
      <title>count the number of most occuring consecutive character in string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/257972#M18053</link>
      <description>&lt;P&gt;Hi! I have a string like this one 'aaccbdaaaccc', and I need to find the character that occurs the most in consecutive order, and how many times it occurs. I thus need two variables as the output. I do not want to consider the caracter 'a'. The answer should be 'c' and '3'. Do anyone have a solution to this? Help is very much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/257972#M18053</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2016-03-21T14:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of most occuring consecutive character in string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/257974#M18054</link>
      <description>&lt;P&gt;You've posted this in Enterprise Guide, are you using the query builder or familiar with SAS data steps?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 14:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/257974#M18054</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-21T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of most occuring consecutive character in string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258120#M18058</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x='aaccbdaaaccc';
length str max_str  $ 200;
pid=prxparse('/(\w)\1*/');
start=1;
stop=length(x);
max_len=0;
call prxnext(pid,start,stop,x,p,l);
do while(p&amp;gt;0);
 str=substr(x,p,l);
 len=length(str);
 if str not =: 'a' and len gt max_len then do;
  max_str=str;
  max_len=len;
 end;
 call prxnext(pid,start,stop,x,p,l);
end;
putlog max_str= max_len= ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Mar 2016 02:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258120#M18058</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-22T02:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of most occuring consecutive character in string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258159#M18064</link>
      <description>I'm writing a data step.</description>
      <pubDate>Tue, 22 Mar 2016 09:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258159#M18064</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2016-03-22T09:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of most occuring consecutive character in string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258160#M18065</link>
      <description>This worked fine! Thank you so much for your help!</description>
      <pubDate>Tue, 22 Mar 2016 09:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/count-the-number-of-most-occuring-consecutive-character-in/m-p/258160#M18065</guid>
      <dc:creator>ak2</dc:creator>
      <dc:date>2016-03-22T09:33:40Z</dc:date>
    </item>
  </channel>
</rss>

