Re: [GENERAL] Case insensitive "contains" search

Поиск
Список
Период
Сортировка
От Gene Selkov Jr.
Тема Re: [GENERAL] Case insensitive "contains" search
Дата
Msg-id 199811100417.WAA22471@antares.mcs.anl.gov
обсуждение исходный текст
Ответ на Re: [GENERAL] Case insensitive "contains" search  (Charles Curley <charles.h.curley@lmco.com>)
Ответы Python interface and large objects?  (Mike Meyer <mwm@phone.net>)
Список pgsql-general
Charles Curley wrote:
>
> Ulf Mehlig wrote:
>
> > In my opinion, the regexps are much more powerfull compared to "like
> > '%anything'"-statements; but the regular expression syntax is a little
> > bit weird, and if you have a look in the docs of programs which
> > heavily depend on regexps (perl, grep, emacs, ...) you'll find some
> > nice annoying little differences in "to-quote-or-not-to-quote"
> > sections ...
>
> Is there a text that describes the RE usage in PostgrSQL? I'd like to know
> how to do more complicated expressions,

Things look like POSIX expressions to me. Also looks like the manuals
for regexp were not included because postgres simply links to the regex
library documented elswhere. Try these two sources:

http://tiger8.com/us/regexp-manpage.html (complete but too formal)
http://www.blighty.com/products/spade/help/d_regex.htm (informal but incomplete)

> like, "^(((charl|jam)es)|(bob))",
> which should match a field that begins with "charles", "james", or "bob".

try (((^charl|^jam)es)|(^bob))

--Gene

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Incrementing a Serial Field
Следующее
От: Mike Meyer
Дата:
Сообщение: Python interface and large objects?