Document toolboxDocument toolbox

matchesParseAnchor

Compare a pattern (custom regex) to a string and return "true" if the pattern matches. This function improves readability of a pattern that contains only '*'. It doesn't do extensive regex.

Usage Details

LQL Command

select matchesParseAnchor(pattern, column) as resultCol from table

Input:

table: Input table.
pattern: Parameter, a custom regex pattern like "logic_com" (same a "^logic._com$" in Java).
column: Column name to match pattern.

Output:

"true" (string) if the column value matches the pattern, otherwise "false".

Example

Input
table

sourcePort
'A emil B logic C'
'A test B util'

LQL command

select *, matchesParseAnchor('A * B * C', col) as a resultCol from table

Output

sourcePort result
'A emil B logic C'"true"
'A test B util'"false"