Re: question about regexp_substr

From: amonte <ax.mount_at_gmail.com>
Date: Tue, 16 Dec 2014 22:29:47 +0100
Message-ID: <CABV7K9uM16CC2jd_QTxUUuu+A6XDvmN7WpjHj_JLsLpVBrFrCA_at_mail.gmail.com>



Hello Jackie

I know + means > 1 and * > 0 occurence. But I dont see why they give different results in my example.

I understand that what query is asking with * is

"find in the string any non-numeric character pattern, no matter if the there is character or not in the third occurence". I dont see why B satisfies such condition?

Thanks in advance

Alex

2014-12-16 22:23 GMT+01:00 Jackie Brock <J.Brock_at_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:29:47 CET

Original text of this message