Skip to content

Instantly share code, notes, and snippets.

@ahmetozer
Created May 12, 2020 21:40
Show Gist options
  • Save ahmetozer/e6516f973265f855d3737aea11b3d1ab to your computer and use it in GitHub Desktop.
Save ahmetozer/e6516f973265f855d3737aea11b3d1ab to your computer and use it in GitHub Desktop.
My regex liblary
port_regex="^((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([1-9][0-9]{3})|([1-9][0-9]{2})|([1-9][0-9])|([1-9]))$"
user_regex="^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment