Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

regular expressions for ip addresses

here there are some regular expressions that may help you recognise ip addresses:

binary format (separated by the '.'):
"([01]{8}.){3}[01]{8}"gsxi

decimal format (separated by the '.'):
"(([01][0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}[01][0-9][0-9]|2[0-4][0-9]|25[0-5]"gsxi
 
PREVIOUS NEXT
Tagged: #regular #expressions #ip #addresses
ADD COMMENT
Topic
Name
8+6 =