From: | "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com> |
---|---|
To: | Marcin Mazurek <M(dot)Mazurek(at)poznan(dot)multinet(dot)pl>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: PL/TCL regex string matching |
Date: | 2000-11-20 17:54:04 |
Message-ID: | 0011201254040C.30061@comptechnews |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Monday 20 November 2000 12:16, Marcin Mazurek wrote:
> Hi,
> I'm trying to write a TCL function which uses regex string matching.
> spi_exec "SELECT count(s.id) as res FROM services s
> WHERE
> s.name=''email account ([0-9+])MB''";
>
> I'd like to match any service with name starting "email account " and quota
> at the end.
> I was trying to use ([0-9+]), (1,2) and some others that I've found in TCL
> guides.
> Is it possible to use regex in PL/TCL and can You show me with the exmaple
> how?
>
> tia
> mazek
>
>
> Marcin Mazurek
These links might be useful:
http://www.postgresql.org/docs/aw_pgsql_book/node52.html
http://www.scriptics.com/man/tcl8.4/TclCmd/regexp.htm
Pg uses '~' as the regexp operator, so you can try that instead of the '='.
Check the first link to see the other pg regexp operators, there are four of
them.
--
-------- Robert B. Easter reaster(at)comptechnews(dot)com ---------
- CompTechNews Message Board http://www.comptechnews.com/ -
- CompTechServ Tech Services http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-11-20 18:17:52 | Re: PL/TCL regex string matching |
Previous Message | Luis Magaa | 2000-11-20 17:17:22 | PostgreSQL as windows 2000 Service |