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
Post a Comment