Query: Add support for regexp queries with ~=

This fixes #124.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #290 from algernon/f/query-regexp

Query: Add support for regexp queries with ~=