Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. local regex="(?:10\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])|172\.(?:3[0-1]|2[0-9]|1[6-9])|192\.168)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])"
  2. local ip_ad='10.129.2.1'
  3. [[ $ip_ad =~ $regex ]] && echo "match!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement