Skip to content

Allow - in the command #759

@xt0rted

Description

@xt0rted

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions