$_ = "zero FOO one two BAR three FOO four five BAR six"; /(FOO.*BAR)(??{ say $1 })(*FAIL)/; __END__ FOO one two BAR three FOO four five BAR FOO one two BAR FOO four five BAR