Implementing regex search.
Add tests for edge cases.