Escaped regex and added implementation of test.