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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to find non printable characters in a column using regexp

Re: How to find non printable characters in a column using regexp

From: dd yakkali <dd.yakkali_at_gmail.com>
Date: Fri, 13 Apr 2007 14:49:08 -0400
Message-ID: <1c8f76b90704131149m58e478elf91d6d81c9e77fac@mail.gmail.com>


Madhu,

thanks for the response, for some reason, it is not working for me. Do you know what is meant by non printable characters?

what i am looking for is any character outside of ascii value 32 and ascii value 126

I thought by control they meant that.

Here is what I found on the web

select count(*) from njcrc.tblprogram where replace(translate(lower( description),'
abcdefghijklmnopqrstuvwxyz1234567890_-+=()*&^%$#@!~`;:}{][|\/?.,><"'''||chr( 10)||chr(13)||chr(9),'X'),'X','') is not null;

thanks

Deen

On 4/13/07, Madhu Sreeram <madhusreeram_at_gmail.com> wrote:
>
>
>
> On 4/13/07, dd yakkali <dd.yakkali_at_gmail.com> wrote:
>
> > I am trying to find the records where there are non printable
> > characters, i am not having success with it
> >
> >
> > select
> > * from njcrc .tblprogram where REGEXP_INSTR(description,'[[:cntrl:]]') >
> > 0;
> >
> >
> >
> > Above sql pulls records where there are no "non printable" characters.
> >
> > Can any point me to an alternate way achieving this or let me know what
> > am i doing wrong.
> >
> >
> >
> > Thanks
> >
> > Deen
> >
> how about this:
> select regexp_replace(string,'[^[:cntrl:]]') from dual; --returns just
> control characters.
>
> -Madhu S
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 13 2007 - 13:49:08 CDT

Original text of this message

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