in reply to Regex Problem
Hints: check carefully for discussions of "capturing," $n variables, and (additional) modifiers (if those other than /g).