Öznur tastan wrote: > > I am still dealing with the same problem. > Rob has suggested me a good solution for macthing consecutive patterns like > H K D but not more looser ones like for K[ED]{3,5}? L.{3}A > andn my poor perl knowledge doesn't help me to generalize it: /
Are you just saying that the patterns that you want to split on can be regexes themselves instead of plain strings? I think my solution will do that fine, but you need to give us an example. All the solutions you've been offered so far are based on your original example. You said: Öznur tastan wrote: > > I have been trying to solve a problem which is about to drive me crazy. > May be some one know the answer(hopefully:) > > I want to get all macthes of a pattern in a string including the overlaping ones. > For example > the string is "xHxxHyyKzDt" > and the pattern is /^(.*)H(.*)K(.*)D(.*)$/ > > so in one round of match $1=x $2=xxHyy $3=z $4=t > in another $1=xHxx $2=yy $3=x $4=t > > > while ($sequence=~/$pattern/g ) > doesn't work I think becaue the matches are overlapping > > while ($sequence=~/(?=$pattern)/g ) which has been solved. Can you explain the full problem a little better? > 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 > Is there a version available that supports this structure? > Or are there any creative ideas of Perl wizards? This is a proposal for Perl 6.0. The latest development source is at 5.9 and the latest stable release is 5.8.3. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>