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

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -