fixed CRM-12976, problem was regex characters were not escaped
Merge pull request #1072 from kurund/CRM-12976

fixed CRM-12976, problem was regex characters were not escaped
Tested locally and this fixes the problem.