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

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Regex help again (sorry, I am bad at these)
Date: 2015-12-29 20:45:42
Message-ID: 20151229204542.GB1812@elch.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

## Christopher Molnar (cmolnar65(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Moench-Tegeder 2015-12-29 20:51:06 Re: Regex help again (sorry, I am bad at these)
Previous Message Melvin Davidson 2015-12-29 19:10:32 Re: Regex help again (sorry, I am bad at these)