What's the difference between REGEXP_SUBSTR and REGEXP_EXTRACT?
-
11-03-2021 - |
Question
What's the difference between REGEXP_SUBSTR and REGEXP_EXTRACT?
As far as I can tell, they seem to do the same thing. Is there some difference in side-effects, or how they perform for certain inputs? How do I know which to choose?
Solution
They are both the same function but one was specifically designed for IBM PureData System for Analytics, which is the regexp_extract() function. The other function REGEXP_SUBSTR() is for DB2 only and doesn't exist on PureData System for Analytics.
Use the one that correlates to whichever system you're working in (seems like DB2).
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange