Regex find

Supported in: Batch, Streaming

Matches an expression against a regular expression. Regular expression can match any part of the string.

Expression categories: Regex, String

Declared arguments

  • Expression - The expression to match against the regular expression.
    Expression<String>
  • Regex - The regular expression to find.
    Expression<String>

Output type: Boolean

Examples

Example 1: Base case

Description: The pattern must be in the string but does not have to match the full value. Argument values:

  • Expression: abcdefg
  • Regex: abc

Output: true


Example 2: Base case

Description: You can find regex patterns. Argument values:

  • Expression: abcdefg
  • Regex: abc?d

Output: true


Example 3: Base case

Description: Regex patterns sometimes don't match input strings. Argument values:

  • Expression: abdefg
  • Regex: ab?d

Output: true


Example 4: Null case

Description: Null pattern do not match. Argument values:

  • Expression: foo
  • Regex: null

Output: false


Example 5: Null case

Description: Null columns do not match. Argument values:

  • Expression: null
  • Regex: ab?d.*

Output: false


Example 6: Null case

Argument values:

  • Expression: foo
  • Regex: pattern
foopatternOutput
foo(false
foonullfalse
nullfoofalse
nullnullfalse