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: PL/SQL : how to drop all the white characters from a string

RE: PL/SQL : how to drop all the white characters from a string

From: Andrey Bronfin <andreyb_at_elrontelesoft.com>
Date: Thu, 06 Sep 2001 01:19:47 -0700
Message-ID: <F001.00384E0E.20010906012051@fatcity.com>

THANX a lot to all who replied !!!

DBAndrey

-----Original Message-----
Sent: Wednesday, September 05, 2001 7:32 PM To: Multiple recipients of list ORACLE-L

You guys are all doing this the hard way!

Regular expressions to the rescue!

Here's a complete test:

declare

   tstr varchar2(100) := 'this contains tabs multiple spaces and single spaces';
begin

   dbms_output.put_line( tstr);
   owa_pattern.change( tstr, '\s', '', 'g');
   dbms_output.put_line( tstr);

end;
/

You may have to run $ORACLE_HOME/rdbms/admin/owacomm.sql to build the regular expression packages.

Read $ORACLE_HOME/rdbms/admin/pubpat.sql for details.

Want to know more about regular expressions? Read the perl docs on regular expressions, look
in 'Programming Perl', or if you're really hard core, get Jeffrey Friedl's book 'Mastering Regular Expressions'

http://www.oreilly.com/catalog/regex/

Jared  

                    Andrey Bronfin

                    <andreyb_at_elrontel       To:     Multiple recipients of
list ORACLE-L <ORACLE-L_at_fatcity.com>        
                    esoft.com>              cc:

                    Sent by:                Subject:     PL/SQL : how to
drop all the white characters from a string   
                    root_at_fatcity.com

 

 

                    09/05/01 05:05 AM

                    Please respond to

                    ORACLE-L

 

 





Dear all !

I need a PL/SQL proc that will drop all the white characters (spaces , tabs , enters etc.. ) from a string stored in a VARCHAR column I'm not trying to load my work to others , but ... if U have such a proc ready , would U please share .
Thanks a lot in advance.

DBAndrey

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Andrey Bronfin
  INET: andreyb_at_elrontelesoft.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Andrey Bronfin
  INET: andreyb_at_elrontelesoft.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Sep 06 2001 - 03:19:47 CDT

Original text of this message

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