Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex for IP Range #29

Open
perfecto25 opened this issue Dec 2, 2016 · 0 comments
Open

Regex for IP Range #29

perfecto25 opened this issue Dec 2, 2016 · 0 comments

Comments

@perfecto25
Copy link

perfecto25 commented Dec 2, 2016

dont have time to submit pull req, but this regex checks for IP validity, can provide 1 IP addr or a range, ie

192.168.5.100-192.200.20.255

^(([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])$|^.*-,{3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

you can check it here
https://regex101.com/

Also for email, this regex is more encompassing
^[a-zA-Z0-9_.+-]@[a-zA-Z0-9_.+-].[a-z][a-z][a-z]

@perfecto25 perfecto25 changed the title Reged for IP Range Regex for IP Range Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant