It would be safer to explicitly use the start/end index of the groups, since a user name might be anything, e.g. "welcome".