expect_match

Regex string match assertion

Passes if the actual String matches the given regular expression pattern.

Parameters

Returns

Expect_pass when matching; Expect_hold on NA; Expect_stop on mismatch or invalid pattern.

Examples

assert(expect_match("user@example.com", ".*@.*"))

See Also

expect_type, expect_str_contains