(PDB-162) Add regexp support to resource parameter queries

The query engine supported this, but the existing "rewrite" rule, to go
from the shorthand parameter syntax to the nested resource query didn't
recognize ~. That is fixed with this commit, so regexps will now work on parameters.