oracle - To insert a value in a String -


i have requirement manipulate string required value.

i need change actualstring99 actualstring_99. passing actualstring99 function , returning actualstring_99 in following way.

select 'value'                                                                                               actual,   regexp_replace('value', '[[:digit:]]')                                                                     string,   regexp_replace('value', '[[:alpha:]]')                                                                     digit,   concat(concat(regexp_replace('value', '[[:digit:]]'),'_'),regexp_replace('value', '[[:alpha:]]')) required dual; 

passing value asactualstring99. have other simple way (using or without using regular expression) out calling function?

to prepend underscore before numerical part of string, can use regexp_replace backreference.

select  regexp_replace('actualstring99','([[:digit:]]+)','_\1') dual; 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -