You are rigth to confuse beacuse I couldn't find the mail I wrote at the beginning that defines the problem.Sorry.. My problem was this I have a sets of patterns and a string and I know in which order these patterns are supposed to exists What I try to do was to extract the substrings when the patterns match to the string but all the matches including the overlapping ones. The simplified version is the one that Rob solves. That is when the sets of pattern is H K D (H is the first pattern) So in the link I give as far as i understood it says
$_ = "abracadabra"; @all = m:any /a.*?a/; can find all matches of substrings starting with a and ending with a. So I thought putting willcard of (.*) in between my sets of patterns can achieve the solution am I wrong? Thanks oznur ----- Original Message ----- From: "WC -Sx- Jones" <[EMAIL PROTECTED]> Cc: "Perl Lists" <[EMAIL PROTECTED]> Sent: Friday, February 20, 2004 11:11 AM Subject: Re: all matches of a regex-continued > Öznur Taştan wrote: > > > In the below link I came across > > > > http://www.perl.com/pub/a/2002/06/04/apo5.html?page=8 > > > > $_ = "abracadabra"; > > @all = m:any /a.*?a/; > > produces: > > > > abra abraca abracada abracadabra aca acada acadabra ada adabra abra > > > That only shows substrings within string that begin with start letter. > > Visually - > abracadabra becomes: > abra > abraca > abracada > abracadabra > ...aca > ...acada > ...acadabra > .....ada > .....adabra > .......abra > > So, you see what you get as a substring, with 'a' as the starting > letter. Is that what you wanted? > > What Rob wrote splits combinations of class set from class group > strings. Two totally different things. > > I guess I am confused. > -Sx- > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>