matchesParseAnchor

Compare pattern to a string.

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

select matchesParseAnchor(pattern, column) as resultCol from table

Input:

table: Input table.
pattern: Parameter, a custom regex pattern like "logiccom" (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'
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"

© Devo Technology Inc. All Rights Reserved.