Contains: ^.* regexp.*$ Not Contains: ^((?!regexp).)*$ Not contains more words: ^((?!regexp1|regexp2).)*$ Helper links: http://www.regular-expressions.info/completelines.html http://unibetter.com/deerchao/zhengzhe-biaodashi-jiaocheng-se.htm#getstarted http://hugege.com/2008/11/29/regular-expression/ http://regexpal.com/