Similarly would be good to try and unify these regex somewhere as it seems to be similar in multiple places.