MSCEWI2020

Regexp_Substr Function only supports POSIX regular expressions.

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.

  • For more support, you can email us at [email protected] or post a message to our forums. If you have a contract for support with Mobilize.Net, reach out to your sales engineer and they can direct your support needs.