Re: Using regexp_replace to remove small words
| От | Peter Eisentraut |
|---|---|
| Тема | Re: Using regexp_replace to remove small words |
| Дата | |
| Msg-id | 1292021942.9879.8.camel@vanquo.pezone.net обсуждение исходный текст |
| Ответ на | Using regexp_replace to remove small words ("Henrique de Lima Trindade" <henrique@vivver.com.br>) |
| Ответы |
Re: Using regexp_replace to remove small words
RES: Using regexp_replace to remove small words |
| Список | pgsql-general |
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.
В списке pgsql-general по дате отправления: