Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: REGEXP_like

Re: REGEXP_like

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 30 Apr 2007 22:51:33 -0700
Message-ID: <1177998693.139878.86580@y80g2000hsf.googlegroups.com>


On May 1, 1:52 am, cptkirkh <k..._at_scic.com> wrote:
> On Apr 29, 5:52 pm, Mladen Gogala <mgogala.SPAM_ME...._at_verizon.net>
> wrote:
>
> > On Fri, 27 Apr 2007 22:07:01 -0700, Vladimir M. Zakharychev wrote:
> > > Indeed, but won't work in 10.1, only in 10.2 and later.
>
> > I didn't know that, thanks! Unfortunately, I don't have any 10.1
> > databases to try, all I have are 10.2. All we need now is for Oracle
> > to take over extproc_perl and implement it as a standard database
> > language.
>
> > --http://www.mladen-gogala.com
>
> Thanks for the help. By looking at the expression of select id from
> my_table where regexp_like(id,'0[0-9]$') It works but what if you have
> to accoutn for numbers from 00-99. This looks like it only counts
> from 00-09. Can you do the following?
>
> select id from my_table where (regexp_like(id,' [00-09]$') can that
> then be edited to be changed in the form of [xx - yy]$ where I can
> change the values xx or yy to any value I wish to limit the query by
> the last two digits?

Wasn't that your initial requirement to only select those rows ending with 00 through 09? As of the second question - no, you need to use '[0-9][0-9]$' or '\d\d$'. I'd suggest you read some primer on Regular Expressions, there are plenty available on the web. At the very least, read the chapter on RE support in Oracle SQL Reference.

Regards,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)    http://www.dynamicpsp.com Received on Tue May 01 2007 - 00:51:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US