let me ask you further:)
I tried the code below
$_="AHAAHKAKADL";
while ( /^(.)*(H)(.)*(K)(.)*(D)(.)*$/gx )
{
print $1."\n";
print $2."\n";
print $3."\n";
print $4."\n";
print $5."\n";
print $6."\n";
print $7."\n";
print "-------\n";
# Restart the checking at one character after the match started.
pos() = $-[0] + 1;
}
but that didn't work ask I expected.
Actually my intention is dividing up the sequence in all combinations
with patterns(these can be regex with willcards and all sort of-and the numberof patterns depends the user input) and keep the positions of the macthes of positions and length of the all patterns and the substrings in between. So I thought may be I could put them in a single pattern as the following:
/^(.)*($pat1)(.)*($pat2)(.)*($pat3)(.)*$/
and match these to the whole sequence to extract the macthes and substrings in between, before and after.
so above example is a simple case where patterns are single character.
i would really appreciate any new point of view.
thanks