Escape regex for 'contains' query

This escapes the regex used for the 'contains' query so that
substrings with special characters can be used.

Change-Id: I811020c09e9029099e45c3a6e8da5ff681200c43