As a general note on your regex style,
. matches any one character, you need to use quantity qualifiers to match more than that. In this case you probably would want to use the lazy versions that will stop as soon as they match.
More info in
perlre about regexes.