Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

To trim tab spaces at beginning and end of string inside PL/SQL Package

862489Dec 7 2016 — edited Dec 7 2016

Hi,

I have been trying to trim the tab spaces (space introduced by pressing tab key), white spaces (space bar) etc in beginning and end of string using the below statement,

However the below trims one tab space, one white space, if it is more than that the tab spaces at beginning of string is not getting trimmed

SELECT trim(REGEXP_REPLACE('STRING','^+[[:space]]','')) into v_var from dual;

SELECT trim(REGEXP_REPLACE*'STRING','[[:space]]+$','') into v_Var1 from dual;

Please help if the trimming of multiple tab spaces /white spaces at beginning and end of string is achievable

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2017
Added on Dec 7 2016
2 comments
2,227 views