regexp_like
function
Applies to: Databricks SQL Databricks Runtime 10.4 LTS and above
Returns true if str
matches regex
. This function is a synonym for rlike operator.
Syntax
regexp_like( str, regex )
Arguments
str
: ASTRING
expression to be matched.regex
: ASTRING
expression with a matching pattern.
Returns
A BOOLEAN
.
The regex
string must be a Java regular expression.
String literals are unescaped. For example, to match '\abc'
, a regular expression for regex
can be '^\\abc$'
.
Examples
> SELECT regexp_like('%SystemDrive%\\Users\\John', '%SystemDrive%\\\\Users.*');
true
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for