Dynamic RegExp pattern matching in Redshift

Recently I needed to match regular expressions patterns in Redshift, where both the string and the regular expression were dynamic values provided from table columns. Unfortunately REGEXP_COUNT and other similar functions in Redshift, do not support columns as the regular expression. Therefore I decided to solve this with a UDF.

Continue reading “Dynamic RegExp pattern matching in Redshift”