use the same regex for lucene escapes, close #143

The escapes for the value were updated recently but the escapes for the
query were forgotten.
Now we use a variable for the regex to reduce duplication.
This should be a module-level constant and not get reassigned on every search.