[postgis-users] Comparing phrases with typo error

schild andreas.schild at bfw.gv.at
Wed Oct 16 01:12:13 PDT 2019


--SELECT 'city centre' ~* 'city  centRe ';
--
--Between city and centRe, there are 2 spaces.  At the end, there is one
--space.
--
--How to make this true?

SELECT 'city centre' not similar to 'city  centRe ';
OR
SELECT 'city centre' ~* trim(regexp_replace('city  centRe ', '\s+', ' ', 'g'));

Cheers,
Andreas


More information about the postgis-users mailing list