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!

remove one last special character from two consecutive special char using regex

KalpataruApr 26 2017 — edited Apr 27 2017

Hi All,

Database version : 11.2.0.4.0

I need to remove one special character from two consecutive special characters if present in a string.

For example

---------------

Consecutive special char is present ), in the following source string so i want remove comma only rest string remains same.

Source String : ABC (S), T MANDIR, ABCDE S FACTORY RD, CDS (NORTH) KALKA. 721212 

Other comma and dots are remain same as it is in the following output string.

Required String : ABC (S) T MANDIR, ABCDE S FACTORY RD, CDS (NORTH) KALKA. 721212

like if a string have /, or /. or \, or \. for every consecutive special characters the last special characters should be removed.

For data we can use the following strings

ABC (S), T MANDIR, ABCDE S FACTORY RD, CDS (NORTH) KALKA. 721212

ABC (S/, T MANDIR, ABCDE S FACTORY RD, CDS (NORTH) KALKA. 721212

Output Required

--------------------

ABC (S) T MANDIR, ABCDE S FACTORY RD, CDS (NORTH) KALKA. 721212

ABC (S/ T MANDIR, ABCDE S FACTORY RD, CDS (NORTH) KALKA. 721212

This post has been answered by BluShadow on Apr 26 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2017
Added on Apr 26 2017
12 comments
716 views