Composing a regular expression can be very tricky. This is a tool to help you compose and test regular expressions. You will be able to see how when an expression is matched that the results are distributed in the array (Syntax 3)
This is version 27 but I have earlier versions if you need one.