Fix term-matching regular expression.