REGEXP

This page describes the REGEXP function in Lenses SQL.

REGEXP(strExpr, regexExpr)

Returns the matched groups otherwise null.

Available in:

ProcessorsSQL Studio

Sample code:

USE `kafka`;
SELECT 
    REGEXP(first_name,'Jo'), 
    first_name 
FROM users-topic
LIMIT 3;

Output:

{
  "value": {
    "REGEXP": [
      "Jo"
    ],
    "first_name": "Jose"
  }
}
{
  "value": {
    "REGEXP": [
      "Jo"
    ],
    "first_name": "Joshua"
  }
}
{
  "value": {
    "REGEXP": [],
    "first_name": "Kathleen"
  }
}

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.