All pages
Powered by GitBook
1 of 1

Loading...

REGEXP

This page describes the REGEXP function in Lenses SQL.

REGEXP(strExpr, regexExpr)

Returns the matched groups otherwise null.

Available in:

Processors
SQL 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"
  }
}