Use regular expressions to query trigram indexes from JS clients