> Hi,
> Thank you for the previous responses, however I am still not getting
> the required results.
> Attempted to do the following.
> unix:.*\M(WARN|NOTICE)\M(?!.*\Mcore\M.*$).*
> AND
> unix:.*(WARN|NOTICE).*(?!core).*
> The file I am testing on has
> 1. unix: NOTICE This line has core in it.
> 2. unix: NOTICE This line does not have the expression.
> 3. unix: WARN This line has core in it.
> 4. unix: WARN This line does not have the expression.
> 5. unix: NOTICE Another line seperate from expression.
> I would like to see all lines above where core is NOT in the line.
> Which would
> match lines 2, 4, 5.
> With unix:.*(WARN|NOTICE).*(core) I can get all lines with 'core' in
> them.
> But attempting to do
> unix:.*(WARN|NOTICE).*(!core) - results in no lines returned.
> unix:.*(WARN|NOTICE).*!(core) - results in no lines returned.
> unix:.*(WARN|NOTICE).*(?!core) - with egrep and awk I get syntax
> errors.
> The saga continues........
> Thank you for ANY assistance.
> Craig.
The reason that you get a syntax error with egrep and awk is that