Regular Expressions in DB2 SQL

Samer Buna picture Samer Buna · Jan 21, 2011 · Viewed 41.2k times · Source

(Other than using a UDF) Any REGEXP-In-SQL support for DB2 9.7 ?

Answer

data_henrik picture data_henrik · Jul 22, 2016

Starting with DB2 11.1 there is built-in regex support. One of the new function is REGEXP_SUBSTR and there are some more.

SELECT REGEXP_SUBSTR('hello to you', '.o',1,1) 
   FROM sysibm.sysdummy1