Is there a way to remove all characters except A-Za-z0-9 when querying some column in PostgreSQL without regex? or is the shortest way is regex?
SELECT foo FROM bar;
-- ajhg asjg, asga. 1234 ax
-- desired result: ajhgasjgasga1234ax
-- regex solution:
SELECT regexp_replace(foo,'[^A-Za-z0-9]','','g') FROM bar;