move regexp flag into the creation of the regexp object and remove it from the test method.