On fre, 2010-12-10 at 10:47 -0200, Henrique de Lima Trindade wrote: > I'm trying to find a regular expression that removes all small (length < N) > words from a string. But, until now I've not been successful. Here is a start: select regexp_replace('Tommy Lee Jones', $$\y\w{2,3}\y$$, ' ', 'g' ); If you want to normalize the spaces after the removal and handle beginning and end of the word, you will need to expand this to cover those cases, but the example should contain the key ingredients. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general