This regex dates from the original commit
(Idb4ad8e6079165d681271987a92cab5d8b7c81be) where I think the negative
matches are intended to stop matching between groups.
I don't think this is necessary. In particular, the negative match on
the last group ($4) means that it will not match if there is a URL in
the free-form text portion.
I've simplified this and also added some comments to make it clear
what it is looking for.
Change-Id: I863d88e9a7ed2fd41924b8fc4a12dbea3ee2b205