Re: Regex help again (sorry, I am bad at these)

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: Regex help again (sorry, I am bad at these)
Дата
Msg-id 20151229204542.GB1812@elch.exwg.net
обсуждение исходный текст
Ответ на Regex help again (sorry, I am bad at these)  (Christopher Molnar <cmolnar65@gmail.com>)
Список pgsql-general
## Christopher Molnar (cmolnar65@gmail.com):

> I have tried something like:
>
>  update pcilms_assign set intro=regexp_replace(intro, '/([^/]*)\" title=$',
> '&files=\1') where intro like '%https://owncloud.porterchester.edu%' and
> course=18 and id=55413;

http://blog.codinghorror.com/parsing-html-the-cthulhu-way/
But you were close:
  regexp_replace(intro, '/([^/]*)" title=', '/&file=\1" title=')
looks like it's doing the right thing on your example.

Regards,
Christoph

--
Spare Space


В списке pgsql-general по дате отправления:

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: Regex help again (sorry, I am bad at these)
Следующее
От: Christoph Moench-Tegeder
Дата:
Сообщение: Re: Regex help again (sorry, I am bad at these)