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

that smells like a solution, quotemeta will add '\' to all non word characters and then during execution that '\' will get quoted to make it '\\' so postgress is happy