How would I search a string for links and add google tracking to the end (ie: &utm_medium=email).

So "<a href='page.php' >" would be converted to "<a href='page.php?utm_medium=email' >"

Thanks