remove trailing space after git version in regex