View on GitHub

JODA - JSON On Demand Analysis

Efficient data wrangling for semi-structured JSON documents

REGEX - String

Checks whether str matches the regular expression regexp

Details

Note: “\” have to be escaped in JODA strings

Input parameters

Name Type Optional Description
str String False String to match
regexp String False Regular expression

Output

Bool: True if str matches regexp. false otherwise

Usage

REGEX(<str>, <regexp>)

Examples

Example 1

Query

LOAD tmp
AS ('': REGEX("dogsitter", "sitter$"))

Result

true

Example 2

Query

LOAD tmp
AS ('': REGEX("345345", "\\d+"))

Result

true