in reply to Regex Help

It's nearly impossible to tell what you want the result to be, what your regex is, and in which way it fails for you.

Try providing us with some sample data and a runnable script along with what you want it to produce. See also How (Not) To Ask A Question.

That being said, perhaps you want to use a while-loop and the /g modifier. But it's just guesswork from my part.