regular expression

Hello All!

I have a file thats something like this: ( a grep output)

/path/of/file/filename.abc.xyz.pqr:! Commented text
/path/of/file/filename.abc.xyz: ! More Commented text

I need to grep out those line from this file whose filename has ".abc" in the filename (anywhere in filename) and then a colon (:), any amount of space or tab, and then a bang (!) sign.

Something like this

*.abc*: (any amount of space/tab)!*

How do i write a RE for this?

I'm doing grep -E "\.sqr*:[ *]!*" file but it's not giving correct result

Thnx for ur help!

Try this :

*.abc*: (any amount of space/tab)!* - patten to be matched

1) /.*\.abc\:\t*\!/s

or

2) /.*\.abc\: *\!/s

grep -E "\.abc.*:*!" file

thnx guys, i did some minor mod, this works for me:
grep -v -E "\.abc*:[ \t]*!" file