Hi, I'm komikoni(Keisuke Konishi).
I created the regular expression function (UDF) which does not exist in db2.
The UDF using the SQL/XML(Xquery).
You can easily install.
List of regular expressions provide UDF
- REG_MATCHES
provides Coincidence existence ( Scalar )
- REG_REPLACE
string substitution ( Scalar )
- REG_COUNT
number of matches retrieved ( Scalar )
- REG_POSITION
match position acquisition ( Scalar )
- REG_SUBSTR
gets a string matching ( Scalar )
- REG_SUBSTR_TABLE
list of matching string information ( Table )
- REG_TOKENIZE_TABLE
list of mismatched string information (divided by a separator string) ( Table )
- REG_ALLTOKEN_TABLE
list of mismatch string and matching string information ( Table )
Scripts can be downloaded from here.
(Sorry in Japanese)
https://www.ibm.com/developerworks/jp/data/library/db2/j_d-regularexpression/
(English :
Machine translation Script Download)
I look forward to your feedback and comments.