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

[MacPerl-WebCGI] making reg ex pattern searches 'back up' in order to findoverlapping matches



Hello,

This may seem like a tangent to web development, but I'm making a cgi
script that does pattern matching.  I'm hoping someone with perl reg ex
expertise might help.

I need to make reg ex pattern searching 'back up' in order to find
overlapping matches to my reg ex.

I'm looking through a pattern like this:


$seq = "CCCAAACCCTTTCCC";

And need to find occurrences of


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

so I get
CCCAAACCC as the first match.

but I don't find the second CCCTTTCCC because the reg ex engine started
looking AFTER this position (i.e. after CCCAAACCC at position 10).

Can any one help?

thanks,
Dawn







Dawn Field
University of Oxford
Molecular Infectious Diseases Group. IMM
John Radcliffe Hospital
Headington
Oxford OX3 9DS

e-mail: dfield@molbiol.ox.ac.uk

tel: 011-44-1865-222346 or 222347
fax: 011-44-1865-222626













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