Unix-like regex help
Posted: Wed May 30, 2007 9:22 am
Hello everybody,
I'd like to know how is it I should write a regex in unix to match a string not followed by another string (anywhere in the line).
To be more specific, I want to find lines where "drop table" is found, but not followed anywhere in the line by the character "&".
For example,
I want to grep the line "drop table dbo.TAB_PUV_CR_0000692" in a file but not the line "drop table dbo.&1"
Thks a lot !!!
I'd like to know how is it I should write a regex in unix to match a string not followed by another string (anywhere in the line).
To be more specific, I want to find lines where "drop table" is found, but not followed anywhere in the line by the character "&".
For example,
I want to grep the line "drop table dbo.TAB_PUV_CR_0000692" in a file but not the line "drop table dbo.&1"
Thks a lot !!!