Re: Regex help again (sorry, I am bad at these) - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: Regex help again (sorry, I am bad at these)
Date
Msg-id 20151229204542.GB1812@elch.exwg.net
Whole thread Raw
In response to Regex help again (sorry, I am bad at these)  (Christopher Molnar <cmolnar65@gmail.com>)
List 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 by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: Regex help again (sorry, I am bad at these)
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: Regex help again (sorry, I am bad at these)