Re: Help with a not match

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Help with a not match
Дата
Msg-id CAKFQuwYbtcRfUy4iSOUqaJtnDOnAJ4vFW+wzrMgvev_r8yD-jg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Help with a not match  ("Campbell, Lance" <lance@illinois.edu>)
Список pgsql-sql
On Fri, Nov 9, 2018 at 10:59 AM Campbell, Lance <lance@illinois.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.


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

Предыдущее
От: "Campbell, Lance"
Дата:
Сообщение: Re: Help with a not match
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Help with a not match