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

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World