============================ Regular expression SUBSTRING ============================ Function: Regular expression SUBSTRING returns the portion of a value who matches a SIMILAR pattern. If the match does not occur, it returns NULL. Author: Adriano dos Santos Fernandes Syntax: ::= SUBSTRING( SIMILAR ESCAPE ) ::= ::= "" Notes: 1) If any one of R1, R2, or R3 is not a zero-length string and does not have the format of a , then an exception is raised. 2) The returned value is the matching portion of R2 where SIMILAR TO R1 || R2 || R3 ESCAPE Examples: substring('abcabc' similar 'a#"bcab#"c' escape '#') -- bcab substring('abcabc' similar 'a#"%#"c' escape '#') -- bcab substring('abcabc' similar '_#"%#"_' escape '#') -- bcab substring('abcabc' similar '#"(abc)*#"' escape '#') -- abcabc substring('abcabc' similar '#"abc#"' escape '#') --