JavaScript regular expression to check mobile phone number, email, ip address, etc.

1. Regular expression to detect IP address

((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: The first character is 2, the second character is 0-4

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325348037&siteId=291194637