Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] regular expressions from hell

From: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Brett McCormick <brett(at)work(dot)chicken(dot)org>, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] regular expressions from hell
Date: 1998-06-01 09:52:57
Message-ID: Pine.LNX.3.96.980601094840.759A-100000@proxy.bazzanese.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sun, 31 May 1998, Thomas G. Lockhart wrote:

> > I've noticed there are no less then 10^10 regex implementations.
> > Is there a standard?  Does ANSI have a regexp standard, or is there
> > a regex standard in the ANSI SQL spec?  What do we use?
> 
> afaik the only regex in ANSI SQL is that implemented for the LIKE
> operator. Pretty pathetic: uses "%" for match-all and "_" for match-any
> and that's it. Ingres had a bit more, with bracketed character ranges
> also. None as rich as what we already have in the backend of Postgres.
> 
> Don't know about any other ANSI standards for regex, but I don't know
> that there isn't one either...
> 
- SQL3 SIMILAR condition.
SIMILAR is intended for character string pattern matching. The difference 
between SIMILAR and LIKE is that SIMILAR supports a much more extensive 
range of possibilities ("wild cards," etc.) than LIKE does.
Here the syntax:

          expression [ NOT ] SIMILAR TO pattern [ ESCAPE escape ]

	                                                  Jose'


In response to

pgsql-hackers by date

Next:From: Herouth MaozDate: 1998-06-01 09:56:09
Subject: Re: Why Postgres (was Re: [HACKERS] custom types and optimization)
Previous:From: DonHabackDate: 1998-06-01 09:09:35
Subject: Re: REMOVE MY ADDRESS (Rod Stewart Live Online (fwd))

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group