User Tools

Site Tools


bash:functions:ip_validity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bash:functions:ip_validity [2021/01/09 11:52] – created peterbash:functions:ip_validity [2021/01/09 11:53] (current) peter
Line 40: Line 40:
 <code bash> <code bash>
 [[ $ip =~ ^[0-9]{1,3}(\.[0-9]{1,3}){3}$ ]] || return 1 [[ $ip =~ ^[0-9]{1,3}(\.[0-9]{1,3}){3}$ ]] || return 1
 +</code>
 +
 +or
 +
 +<code bash>
 +^[1-9][0-9]{,2}(\.[1-9][0-9]{,2}){3}$
 </code> </code>
  
bash/functions/ip_validity.1610193173.txt.gz · Last modified: 2021/01/09 11:52 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki