Did you try printing the values of your variables as I suggested?
In reply to Re^5: An overlapping regex capture by 1nickt in thread An overlapping regex capture by Peter Keystrokes