Column.
rlike
SQL RLIKE expression (LIKE with Regex). Returns a boolean Column based on a regex match.
Column
Changed in version 3.4.0: Supports Spark Connect.
an extended regex expression
Column of booleans showing whether each element in the Column is matched by extended regex expression.
Examples
>>> df = spark.createDataFrame( ... [(2, "Alice"), (5, "Bob")], ["age", "name"]) >>> df.filter(df.name.rlike('ice$')).collect() [Row(age=2, name='Alice')]