The tilde symbol can be used as a containment operator providing a pattern match if a string matches a regular expression: