postgresql - How to convert a word in regex uppercase and lowercase? -


i working postgres db , need convert text regex accepts uppercase , lowercase in letter, example:

transform palaver "word" in [ww] [oo] [rr] [dd]

i trying unsuccessfully command:

select regexp_replace ('word', '[a-za-z]', '[ww]', 'gi'); 

i not bother adding character classes per each letter, , use inline modifier (?i):

select regexp_replace ('word', '^', '(?i)'); 

see sqlfiddle


Comments

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -