1 数字字符串2 C 语言标识符3 IP 地址字符串4 URL 字符串 ( 统一资源定位符 )5 。。。
1 [ 0 - 9 ] + 代表数字

练习:用正则表达式描述IPV4的网络地址
1 asdsdss192 . a . 65.4 ddgdgsgsfdg 123 adsad 123 sa 676761234 safd192 . 168.63.100 fed2 987685 dfgfdgf192 . 168.63.1 dsabcd245345456 abcdefg
1 ([0-9]{1,3}\.){3}[0-9]{1,3}
(Global search Regular Expression and Print out the line的简称,即全面搜索正则表达式并把行打印出来)

1 grep - n - E -- color = always - H "([0-9]{1,3}.){3}[0-9]{1,3}" 1. txt
练习: 查找1.txt 里的大于1000的数字

- #!/bin/bash
-
- grep -n -E --color=always -H "([1-9][0-9]{3})" 2.txt