| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера