我想要一个 perl 正则表达式从以下输出中 grep 一个单词:
Process Completed;Result= Volume in drive D has no label.
Volume Serial Number is 328A-C899
Directory of D:\Program
07/14/2013 12:09 PM <DIR> .
07/14/2013 12:09 PM <DIR> ..
06/16/2013 01:07 PM <DIR> IPS
07/14/2013 12:10 PM <DIR> IPS1
07/14/2013 12:12 PM <DIR> IPS2
07/14/2013 12:16 PM <DIR> IPS3
07/14/2013 01:50 PM <DIR> IPS4
07/14/2013 12:17 PM <DIR> IPS5
07/14/2013 12:17 PM <DIR> IPS6
07/14/2013 12:18 PM <DIR> IPS7
07/14/2013 12:18 PM <DIR> IPS8
06/16/2013 01:10 PM <DIR> IPSCommon
07/08/2013 12:32 PM <DIR> _IPS10
07/08/2013 12:32 PM <DIR> _IPS11
07/08/2013 12:32 PM <DIR> _IPS12
07/08/2013 12:32 PM <DIR> _IPS13
07/08/2013 12:32 PM <DIR> _IPS14
07/08/2013 12:57 PM <DIR> _IPS15
07/08/2013 12:32 PM <DIR> _IPS16
07/08/2013 03:38 PM <DIR> _IPS17
07/08/2013 12:32 PM <DIR> _IPS18
07/08/2013 12:32 PM <DIR> _IPS9
0 File(s) 0 bytes
22 Dir(s) 770,968,162,304 bytes free
- 要求是仅 grep 具有类似数字
IPS7
且不以开头的 IPS 单词_
我使用了以下正则表达式IPS\d+\d*$
,但这将 grep 开头的单词_
也
我该如何指定!不是_
吗?