if ( /((?!Exception\s+Handler|ExceptionHandler)).*Exception:|\w+Exception/i ) { print "FOUND : $_\n"; }