in reply to special regexp

What are your boundary conditions (the point Corion raised). The following seems to be fine:
perl -e "print \"xaxbxxxxdexfx\" =~ /x(.)(?=x)/g"
That will print "abxf". This may or may not be appropriate. If you can clarify what to do with multiple x's, it will be easier to come up with a match.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.