fixing regex global test bug