| От | Marcus Engene |
|---|---|
| Тема | regexp_replace() [noindex] thing |
| Дата | |
| Msg-id | 48DBB171.3090001@engene.se обсуждение исходный текст |
| Ответы |
Re: regexp_replace() [noindex] thing
|
| Список | pgsql-general |
Hi!
I'm using tsearch2 and sometimes there are blocks of text that shouldn't
be indexed.
There is a trigger function that gathers data from the usual suspects
and updates the index. in this trigger, I'd like to exclude thing in a
[noindex] tag:
select
regexp_replace
('innan[noindex]apa[/noindex]klas[noindex]banan[/noindex]',
'(\\\[noindex\\\])+.*?(\\\[/noindex\\\])+',
' ')
I would like to have a function like the above that returns "innan klas"
for this data. I would have expected it to as I use the non greedy version.
Could someone please point me in the general direction here?
Best regards,
Marcus
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера