added expect_regex, modified expect to call it