Regular Expression Match Operators
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Operators for matching strings against regular expression patterns. Regular expressions provide more powerful pattern matching than LIKE.
| Operator | Description |
|---|---|
~ | Matches regular expression, case-sensitive |
~* | Matches regular expression, case-insensitive |
!~ | Doesn't match regular expression, case-sensitive |
!~* | Doesn't match regular expression, case-insensitive |
<string>: The string to match against.<pattern>: The regular expression pattern.
Returns a boolean value indicating whether the string matches (or does not match) the pattern.
- Regular expressions are more powerful than
LIKEpatterns, supporting complex patterns like repetition, alternation, and character classes. - Unlike
LIKE, regular expressions match anywhere within the string by default. Use^and$anchors to match the start and end of the string. - For detailed regex syntax, see Regular Expression Syntax.
Match a pattern with case sensitivity.
Returns true.
Returns false because case does not match.
Match a pattern ignoring case.
Returns true.
Check that a string does not match a pattern.
Returns true because case-sensitive match fails.
Returns true because the pattern is not found.
Match one of multiple patterns.
Returns true because the string contains 'b'.
Match patterns at the beginning of a string.
Returns true because the string starts with 'a'.
Returns false because the string does not start with 'b' or 'c'.