Regular Expressions:
((2[0-4]\d|25[0-5]| [01]?\d\d?] \.) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?]
((2[0-4]\d| 25[0-5]| [01]?\d\d?] \.) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?]
The red block represents: the first character is 2, the second character is 0 to 4, and the third character is any digit. Represents 200~249.
The green block represents: the first character is 2, the second character is 5, and the third character is 0 to 5. Represents 250~255.
The blue block represents: The first character is 0, or 1, or can not have this character, the second character is any one digit, the third character is any one digit, can not have this character. Represents the 1~199, which can have leading zeros.
| means "or", as long as the meaning of any one of the three pieces is satisfied.
Before and after the "(" and ")" represents this is a set of
((2[0-4]\d|25[0-5]| [01]?\d\d?] \.) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?]
{3} represents repeated three times. such as "255.255.255."
((2[0-4]\d|25[0-5]| [01]?\d\d?] \.) {3} (2[0-4]\d|25[0-5]|[ 01]?\d\d?)
In the end, the meaning of this group is "." The same test is added to the back.
The regular expression of the IP address is detected by JS