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

Allow - in the command #759

Open
xt0rted opened this issue Mar 17, 2024 · 0 comments
Open

Allow - in the command #759

xt0rted opened this issue Mar 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@xt0rted
Copy link
Owner

xt0rted commented Mar 17, 2024

The regex being used matches a-zA-Z0-9_. Updating this to include - will let you match usernames which can't be done currently. Usernames have the following criteria:

  • Must start with a-zA-Z0-9
  • Can contain multiple - but not consecutively
  • Must end with a-zA-Z0-9

This is the current regex:

/^\/([\w]+)\b *(.*)?$/m

And this is what I'm thinking of switching to:

/^\/([a-zA-Z0-9]+(?:[-_][a-zA-Z0-9]+)*) *(.*)?$/m
@xt0rted xt0rted added the enhancement New feature or request label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant