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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Best way to find string composed of dup character?

Re: Best way to find string composed of dup character?

From: Dr Drudge <drdrudge_at_hotmail.com>
Date: 26 Feb 2004 11:06:08 -0800
Message-ID: <748419a0.0402261106.5746e41c@posting.google.com>


"Kim Berg Hansen" <kbh@_dont_want_spam_thansen.dk> wrote in message news:<tAk%b.3386$Af3.77_at_news.get2net.dk>...
> "Dr Drudge" <drdrudge_at_hotmail.com> wrote in message
> news:748419a0.0402250601.18e767f_at_posting.google.com...
> > I need to be able to determine whether a varchar2 column contains a
> > string of dup characters. Specifically, I need to weed out (or
> > alternatively find) phone numbers like: 1111111, 9999999999, etc.
>
>
> If you get a chance to use Oracle 10G, then it's becoming much, much easier
> to do stuff like that.
> In 10G you could do something like this :
>
> where repexp_like(p1.phonenumber,'([[:digit:]])\1\1\1\1\1\1')
>
> Isn't that much nicer ? ;-)

Yes- it is much nicer with regular expressions.

Thanks for all your input (see above) Received on Thu Feb 26 2004 - 13:06:08 CST

Original text of this message

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