| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | "Campbell, Lance" <lance(at)illinois(dot)edu> |
| Cc: | pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Help with a not match |
| Date: | 2018-11-09 18:17:04 |
| Message-ID: | CAKFQuwYbtcRfUy4iSOUqaJtnDOnAJ4vFW+wzrMgvev_r8yD-jg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Fri, Nov 9, 2018 at 10:59 AM Campbell, Lance <lance(at)illinois(dot)edu> wrote:
> SELECT regexp_matches(content, '/(?!files/'||id||'/)(files/\d+/)/', 'g') FROM tablea
> I get no matches. My guess is I am close but slightly off on the syntax.
You have two forward slashes in a row at the end of the pattern:
( # capture
files/\d+/ #pattern, digits followed by slash, lead by files/
) # close capture
/ # another bracket - unlike Perl the // are not syntax but pattern
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Gierth | 2018-11-09 22:04:32 | Re: Help with a not match |
| Previous Message | Campbell, Lance | 2018-11-09 17:59:07 | Re: Help with a not match |