regex-cheatsheet
regex-cheatsheet copied to clipboard
Oracle Database
https://docs.oracle.com/cd/B19306_01/B14251_01/adfns_regexp.htm https://docs.oracle.com/cd/B13789_01/appdev.101/b10795/adfns_re.htm
Oracle Database follows the exact syntax and matching semantics for these operators as defined in the POSIX standard for matching ASCII (English language) data. You can find the POSIX standard draft at the following URL:
http://www.opengroup.org/onlinepubs/007908799/xbd/re.html
Oracle Database enhances regular expression support in the following ways:
Extends the matching capabilities for multilingual data beyond what is specified in the POSIX standard.
Adds support for the common Perl regular expression extensions that are not included in the POSIX standard but do not conflict with it. Oracle Database provides built-in support for some of the most heavily used Perl regular expression operators, for example, character class shortcuts, the non-greedy modifier, and so on.
It says, it's posix compliant but e.g. doesn't use \( \) for matching (which is posix afaik)
A short example of oracle regexp is
REGEXP_REPLACE(text1,
'^([[:alpha:]]+): ([[:alpha:]]+)$',
'\2 \1')
which replaces lastname: firstname with firstname lastname
I don't have access to an Oracle server, however it seems that it might be using the POSIX Extended syntax?
You can download a version (similar to the one I have, I think; just newer) at http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html