in reply to Re^3: Calculating variable {n} in regex matchin thread Calculating variable {n} in regex match
But sometimes cleverness can be a curse, so you may want to reserve your thanks until later.