Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: regexp_substr occurrences problem
PhilHibbs wrote:
> 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.
From what input data?
I'm still trying to figure out why you wrote an infinite loop?
-- Daniel Morgan University of Washington Puget Sound Oracle Users GroupReceived on Mon Sep 18 2006 - 10:52:48 CDT
![]() |
![]() |