Validate IP Address with Regular Expression

imavbges
IP Address Regular Expression Pattern ^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\. ([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$ Description ^ #start of the line ( # start of group #1 [01]?\\d\\d? # Can be one or two digits. If three digits appear, it must start either 0 or 1 # e.g ([0-9], [0-9][0-9],[0-1][0-9][0-9]) | # …or 2[0-4]\\d # start with 2, follow by 0-4 and end with any digit (2[0-4][0-9]) |…

Read More »

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.