REGEX_MATCHES

This page describes the REGEX_MATCHES function in Lenses SQL.

REGEX_MATCHES(strExpr, regexExpr)

Returns an array of captured groups.

Available in:

Processors
SQL Studio

Sample code:

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

Output:

{
  "value": {
    "REGEX_MATCHES": [
      [
        "Jo"
      ]
    ],
    "first_name": "Jose"
  }
}
{
  "value": {
    "REGEX_MATCHES": [],
    "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.