Skip to content

Instantly share code, notes, and snippets.

@aziznatour
Created January 3, 2018 21:45
Show Gist options
  • Save aziznatour/03e2f97cff467f91b0a5e510583603d3 to your computer and use it in GitHub Desktop.
Save aziznatour/03e2f97cff467f91b0a5e510583603d3 to your computer and use it in GitHub Desktop.
A simple Regex for detecting bot commands (e.g. `?help` and `bot!start`)
/^.{0,20}[~!$%^&*_\-+:;?=>]\w+(?:\s\w*)?$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment