in reply to Find text between two strings?

Consider the following string:

foofooxxxbarbar

Then what constitutes the text between "foo" and "bar"?