Skip to content

Instantly share code, notes, and snippets.

@shrmnk
Created October 21, 2019 03:27
Show Gist options
  • Save shrmnk/5f2aeecd7b4acc6db069e1e347572d56 to your computer and use it in GitHub Desktop.
Save shrmnk/5f2aeecd7b4acc6db069e1e347572d56 to your computer and use it in GitHub Desktop.
Regex validating IP address OR prefix list
^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))|pl-[0-9a-z]{8})$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment