in reply to Re^5: postgres reg expression quoting
in thread postgres reg expression quoting

after some testing it showed that this solution fails on unicode strings :/ unfortunately