Re: A function to count all ocurrences of a character within a string.

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: A function to count all ocurrences of a character within a string.
Дата
Msg-id AANLkTimkG6PrtaS7MQ8qxEuMRLFre6ZxOXtgfApb+OgE@mail.gmail.com
обсуждение исходный текст
Ответ на A function to count all ocurrences of a character within a string.  (Piotr Czekalski <pczekalski@techbaza.pl>)
Ответы Re: A function to count all ocurrences of a character within a string.  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-sql
On Mon, Mar 7, 2011 at 1:20 PM, Piotr Czekalski <pczekalski@techbaza.pl> wrote:
> Hello pgsql community,
>
> Is there any string function (other than regex / scan & compare loop) to
> obtain a list (or even a count) of characters within a string?
> strpos and position seems to return only first occurence of a char/string
> within substring.
> The goal is to check if a string contains equal number of opening and
> closing parenthesis, and if there are any of them.
>
> Regards,
>
> Piotr Czekalski

Couple examples here that might help to get you started
http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Get_count_of_substrings_in_string


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

Предыдущее
От: Piotr Czekalski
Дата:
Сообщение: A function to count all ocurrences of a character within a string.
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: A function to count all ocurrences of a character within a string.