[Bioperl-l] approximate regular expression

José Ramón Blas Pastor joseramonblas at gmail.com
Thu Mar 22 16:47:03 EDT 2012

I want to find all the matches of a given pattern in a string but doing
fuzzy (approximate) pattern matching. I want to allow small variations (1
or 2 positions substituted) in the match. I have tried String::approx
module, but I do not know how to manage syntax

use String::approx 'amatch';
my $pattern = "JEJE";
while (?=/$pattern/) {
[download] <http://perlmonks.org/index.pl?abspart=1;displaytype=displaycode;node_id=961099;part=1>

How could I achieve that this 'while' allow 1 substitution from $pattern?
That is that "JEFE", "JUJE","JEDE",... would be true matches.

Thanks a lot in advance. JR

José Ramón Blas - PhD
Dept. Biochemistry - Medicine School
University of Castilla-La Mancha
C Almansa, 14
02006 Albacete (Spain)

Phone: +34 967599200 ext. 2958

More information about the Bioperl-l mailing list