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.
In reply to Re: Regex Help
by moritz
in thread Regex Help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |