Skip to content

Instantly share code, notes, and snippets.

@stuk88
Created September 1, 2017 05:49
Show Gist options
  • Save stuk88/6f45c684027b7e0118897ebdcb9d40af to your computer and use it in GitHub Desktop.
Save stuk88/6f45c684027b7e0118897ebdcb9d40af to your computer and use it in GitHub Desktop.
/(?:SELECT\s+?([a-z][a-z0-9_,.()* ]*?)\s+){1}(?:FROM\s+([a-z_][a-z_$0-9@]+)\s+?){1}(?:JOIN\s+([a-z_][a-z_$0-9@]*?)\s+ON\s+([a-z][a-z0-9_,.]*?)\s+=\s+([a-z][a-z0-9_,.]*)\s+?)*(?:GROUP\sBY\s+?([a-z][a-z0-9_,.]+)\s*)?(?:ORDER\sBY\s+?([a-z][a-z0-9_,.]*)\s*?)?/i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment