Posted on 2014-02-12
I need to strip special characters (<< , >> ,<,>) from an string and also replace characters like \,_,) with \\ and \_ to maintain their special meaning.
Below is the query iam using , but it replaces all the special characters and returns only the alpha numeric string.
Select regexp_replace('<<sam*>>','[^[:alnum:]]') from dual;
I need an output like this :sam*
If input string is : <sam> , output :sam
if input string is : <<sam*/>> output : sam*\\ -- escape sequence to override the special meaning of \
Any help is really appreciated.
thanks in advance