github-username-regex icon indicating copy to clipboard operation
github-username-regex copied to clipboard

Does not match trailing dash

Open mickyginger opened this issue 3 years ago • 3 comments

Quite surprisingly a trailing dash is allowed on GitHub... I'm not sure if this is a new thing or perhaps it's legacy and they no longer support it, but there are users out there with trailing dashes in their username, eg: https://github.com/Guin-

I'm not sure if this is something that you want to support or not

mickyginger avatar Aug 20 '21 16:08 mickyginger

I've just (Jan 4th, 2022) tried registering a username with a trailing dash and got this message: Username may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen. Username redacted- is not available.

paulftw avatar Jan 04 '22 19:01 paulftw

GitHub might have increased their username restrictions here, but there are plenty of existing accounts that do have trailing hyphens.

Here's a random one: https://github.com/foo-

woodruffw avatar Feb 17 '22 19:02 woodruffw