Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> regexp_substr occurrences problem
Why doesn't this match more than once:
DECLARE
i NUMBER := 1;
s VARCHAR2(10);
BEGIN
LOOP
s := REGEXP_SUBSTR( 'ABC|DEF|GHI|JLK', '\|[^\|]+\|', 1, i )
EXIT WHEN s IS NULL;
i := i + 1;
DBMS_OUTPUT.PUT_LINE( s );
END LOOP;
END;
All I get is |DEF| when I think I should get |GHI| as well. Where am I
going wrong?
Phil Hibbs. Received on Mon Sep 18 2006 - 08:15:42 CDT
![]() |
![]() |