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:51:06
Message-ID: 20151229205106.GC1812@elch.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

## Melvin Davidson (melvin6925(at)gmail(dot)com):

> UPDATE pcilms_assign
> SET intro = REPLACE (intro, 'HVACR1114_LAB_13A.pdf',
> '&file=HVACR1114_LAB_13A.pdf')
> WHERE intro like 'https://owncloud.porterchester.edu%'
> AND course=18 and id=55413;

Unfortunately, that tries to do the right thing for that example
only but does not account for the 200k documents not named
HVACR1114_LAB_13A.pdf.

> NOTE: DO NOT use % in front of 'https: <https://owncloud.porterchester.edu>
> It is not needed and will slow query performance.

And that will plainly not work if the string does not start with the
URL - as in the example given.
It even won't work regardless of version and OS.

Regards,
Christoph

--
Spare Space

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2015-12-29 21:04:40 Re: grep -f keyword data query
Previous Message Christoph Moench-Tegeder 2015-12-29 20:45:42 Re: Regex help again (sorry, I am bad at these)