MSCEWI2020

Regexp_Substr Function only supports POSIX regular expressions.

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Low

Description

Currently, there is no support in SnowFlake for extended regular expression beyond the POSIX Basic Regular Expression syntax.

This warning is added every time a function call to REGEX_SUBSTR, REGEX_REPLACE, or REGEX_INSTR is transformed to SnowFlake to warn the user about possible unsupported regular expressions. Some of the features not supported are lookahead, lookbehind, and non-capturing groups.

Code Example

Input Code:

SELECT REGEXP_SUBSTR('qaqequ','q(?=u)', 1, 1);

Output Code:

SELECT 
--** MSC-WARNING - MSCEWI2020 - REGEXP_SUBSTR FUNCTION ONLY SUPPORTS POSIX REGULAR EXPRESSIONS **
REGEXP_SUBSTR('qaqequ','q(?=u)', 1, 1);

Recommendations

  • Check the regular expression used in each case to determine whether it needs manual intervention. More information about expanded regex support and alternatives in SnowFlake can be found here.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated