The following query:
SELECT REGEXP_SUBSTR('mint chocolate chip chop', ' ch(i|o)p', 1, 2, 'i');
returns 'chop' because it is the second occurrence of the match.
The following query:
SELECT REGEXP_SUBSTR('mint chocolate chip chop', ' ch(i|o)p', 1, 2, 'i');
returns 'chop' because it is the second occurrence of the match.