in reply to while =~ consecutive matching problem

What exactly do you think your \s is doing?

-- update --

a b x y i x y p (will find two xy's)

I don't see any at all unless you meant x y as opposed to xy?

Reap this node please (is there a special way of requesting NodeReaper to come along?) Reason: alcohol clouded reasoning.