Fixed regex creation in test cases