RE: question about regexp_substr

From: Jackie Brock <J.Brock_at_cablelabs.com>
Date: Tue, 16 Dec 2014 21:23:30 +0000
Message-ID: <9FA6FCA2E9AD2E4E82FCBAC5F343BCA523757D87_at_EXCHANGE.cablelabs.com>



The plus sign indicates that it expects at least 1 digit (1 or more). The * means 0 or more.

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of amonte Sent: Tuesday, December 16, 2014 2:07 PM To: Oracle-L Group
Subject: question about regexp_substr

Hi people
I have some difficulty understanding applying an operator to the pattren in regexp_substr. Not sure if anyone can help ? The question is, what is the difference between these two queries:

select regexp_substr('A1B2C3D4E', '[^0-9]+', 1, 3) from dual;

R
-

C

select regexp_substr('A1B2C3D4E', '[^0-9]*', 1, 3) from dual;

R
-

B
Why * and + gives different answers?
Thanks in advance

Alex
--

http://www.freelists.org/webpage/oracle-l Received on Tue Dec 16 2014 - 22:23:30 CET

Original text of this message