github-username-regex
github-username-regex copied to clipboard
Support for historical usernames with trailing hyphens.
By switching to a negated look-ahead assertion, the new RegExp can easily detect double hyphens while also allowing a single hyphen at the end of a username. We don't lose the following character checked against [a-z\d] from the positive look-ahead assertion as this is covered by the earlier instance of this in the expression.
Added new unit test cases and updated README.md.
Resolves #4.