[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] making reg ex pattern searches 'back up' inorder to find overlapping matches



At 11:44 AM +0000 12/10/1999, Dawn Field wrote:
>$seq = "CCCAAACCCTTTCCC";

For the specific example you've offered, you
could also...

@foo = split (/C+/,$seq);
foreach (@foo) {print "CCC$_CCC\n";}

>(C|G)\1{2,7}(.){5,10}(C|G)\1{3,8}

If the (C|G) part is important then,

@foo = split (/[CG]+/, $seq);

(of course this would also split on patterns
like CGC or GGC or...)

-Eric


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org