Added "test-for-re" that will get a RE + str and test; renamed functions