Fixed issue with regex rework and added some new regression tests.