in reply to Regex Problem

Sure:

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