[1]在windows下和linux使用上的不同點
windows下的用法
grep -ior -e img[0-9]\{2,\}
也可以是
grep -ior -e
"img[0-9]\{2,5\}
"
linux 下的用法
grep -ior -e
"img[0-9]\{2,5\}
"
在windows下和linux下的區別主要是 正則表達式 的引號
[2]多條件查詢
and 關系
grep -ro -e "\/tour\/" * | grep -n? -e? "index"
[3]貪婪模式
比如:
grep -o? -e "href=\".*[0-9]\{3\}\"" *.html
返回的結果是
walking_beijing.html:href="/cts/tour/travelitinerary_357"
walking_beijing.html:href="/cts/tour/travelprice_357"
walking_beijing.html:href="/chinatravelguide/index.html"><img src="http://image.chinatraXXXXX.com/xianlu_013.jpg" width="430" height="125"
這個藍色的匹配項不是我想要的
[4]
|----------------------------------------------------------------------------------------|
版權聲明 版權所有 @zhyiwww
引用請注明來源 http://www.tkk7.com/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2009-02-24 14:01
zhyiwww 閱讀(494)
評論(0) 編輯 收藏 所屬分類:
linux 、
windows 、
debian