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

  • From: "dd yakkali" <dd.yakkali@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 13 Apr 2007 14:49:08 -0400

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@xxxxxxxxx> wrote:



 On 4/13/07, dd yakkali <dd.yakkali@xxxxxxxxx> 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

Other related posts: