Implement regex queries. Closes #12