Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
3.0.0
-
None
-
None
Description
Function | Return Type | Description | Example | Result |
---|---|---|---|---|
substring(string from pattern) | text | Extract substring matching POSIX regular expression. See Section 9.7 for more information on pattern matching. | substring('Thomas' from '...$') | mas |
substring(string from pattern for escape) | text | Extract substring matching SQL regular expression. See Section 9.7 for more information on pattern matching. | substring('Thomas' from '%#"o_a#"_' for '#') | oma |
For example:
-- T581 regular expression substring (with SQL's bizarre regexp syntax) SELECT SUBSTRING('abcdefg' FROM 'a#"(b_d)#"%' FOR '#') AS "bcd";