Chinaunix
标题:
正则表达式中或者怎样写
[打印本页]
作者:
Wangwen
时间:
2007-05-14 10:51
标题:
正则表达式中或者怎样写
如:
grep abc或者def a.txt
在文件中检索包含abc或者def的行
作者:
davistar
时间:
2007-05-14 10:59
grep -E '(abc|def)' urfile
复制代码
作者:
wdavid
时间:
2007-05-14 10:59
grep "abc\|def" a.txt
or
egrep "abc|def" a.txt
作者:
Wangwen
时间:
2007-05-14 11:03
谢谢 呵呵
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2