Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
"CORE 11.2.0.4.0 Production"
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Could you please help me to understand why my repeater does not work.
it is my understanding that any sub expression that precedes {2} gets executes 2 time.
-- Want output as : 9567993B-3BE1 , Get first (9567993B) and second (3BE1 ) String
select regexp_substr('9567993B-3BE1-4480-B64A-ADFAD4CA5887' ,'([^-]+){2}',1, 1) from dual;
--[^-]* -- match any character other than -
--{2} repeater above search 2 timesĀ
-- 1 Start Searching at Position one in the string .
-- 1 Return the output of the match.
Below works .
select regexp_substr('9567993B-3BE1-4480-B64A-ADFAD4CA5887' ,'[^-]*-[^-]*',1,1) from dual;