Re: reverse strpos?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: reverse strpos?
Дата
Msg-id 20071112202524.GA26692@depesz.com
обсуждение исходный текст
Ответ на reverse strpos?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Список pgsql-general
On Mon, Nov 12, 2007 at 10:54:53AM -0500, Gauthier, Dave wrote:
> Is there a function that'll return the position of the last occurance of
> a char in a string?
> For Example, in the string 'abc/def/ghi' I want the position of the 2nd
> '/'.

# select length(substring('abc/def/ghi' from '^(.*/)'));
 length
--------
      8
(1 row)

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: WAL segments size
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] plperl and regexps with accented characters - incompatible?