move shortname regex into a variable

This way we only have to update the regex once if it changes again