Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The regex validating the package name is wrong #10

Closed
stof opened this issue May 12, 2015 · 0 comments
Closed

The regex validating the package name is wrong #10

stof opened this issue May 12, 2015 · 0 comments
Labels

Comments

@stof
Copy link

stof commented May 12, 2015

It should match the regex used by Composer:

'[A-Za-z0-9][A-Za-z0-9_.-]*/[A-Za-z0-9][A-Za-z0-9_.-]*'

Your current regex has both false positives and false negatives:

  • it accepts package names starting with an underscore
  • it rejects package names containing a dash
  • it rejects package names containing dots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants