分页: 1 / 1
这个为什么不能匹配?????
发表于 : 2012-08-17 17:16
由 13378333
^www\..+\.nginx\.org$
为什么不能匹配www.123.nginx.org
root@wangyang:/yuan/nginx-1.2.3# sed -e '^www\..+\.nginx\.org$/p' a
sed: -e 表达式 #1, 字符 1: 未知的命令:“^”↵
Re: 这个为什么不能匹配?????
发表于 : 2012-08-17 19:01
由 cuihao
代码: 全选
sed -e '/^www\..+\.nginx\.org$/p' a
?
Re: 这个为什么不能匹配?????
发表于 : 2012-08-17 20:18
由 cjxgm
Re: 这个为什么不能匹配?????
发表于 : 2012-08-18 0:26
由 13378333
cuihao 写了:代码: 全选
sed -e '/^www\..+\.nginx\.org$/p' a
?
thanks,话说为啥要加/啊!!!

Re: 这个为什么不能匹配?????
发表于 : 2012-08-18 0:30
由 枫叶饭团
你猜,你猜,你猜猜猜
/regexp/
Match lines matching the regular expression regexp
不看man者,鄙视
Re: 这个为什么不能匹配?????
发表于 : 2012-08-18 9:26
由 YeLee
这个……

Re: 这个为什么不能匹配?????
发表于 : 2012-08-18 18:54
由 13378333
枫叶饭团 写了:你猜,你猜,你猜猜猜
/regexp/
Match lines matching the regular expression regexp
不看man者,鄙视
不是不看,是鸟语有压力
Re: 这个为什么不能匹配?????
发表于 : 2012-08-18 19:26
由 lilydjwg
13378333 写了:枫叶饭团 写了:你猜,你猜,你猜猜猜
/regexp/
Match lines matching the regular expression regexp
不看man者,鄙视
不是不看,是鸟语有压力
看不懂者小心同鄙视哦~