perlquestion
debiandude
<p>
Hey. I have a string that contains data similiar to this: 'aaabbcdd'. I was trying to write write a regex that would match 'aaa' then 'bb' then 'c' and then 'dd'. That is, it would group together everything that is the same.
</p>
<p>
I figured I would have to use the lookahead operator to check to see if what he just matched matches what is next but I am not sure how to do this. Also I was planning on doing it in a while loop like this:
</p>
</p>
<code>
my $string = 'aaabbcddeef';
while($string =~ m/\w(?!patternthatworkd)/gi) {
do stuff....
}
</code>
</p>
<p>Thanks for any help</p>