String not starting with a string

^(?!foo).+

String not containing a string

http://stackoverflow.com/questions/406230/regular-expression-to-match-line-that-doesnt-contain-a-word ^((?!hede).)*$