Re: Why this regexp matches?!
От | hubert depesz lubaczewski |
---|---|
Тема | Re: Why this regexp matches?! |
Дата | |
Msg-id | 20120206114853.GA13214@depesz.com обсуждение исходный текст |
Ответ на | Re: Why this regexp matches?! (Jasen Betts <jasen@xnet.co.nz>) |
Список | pgsql-general |
On Mon, Feb 06, 2012 at 11:29:23AM +0000, Jasen Betts wrote: > On 2012-02-04, hubert depesz lubaczewski <depesz@depesz.com> wrote: > > select 'depesz depeszx depesz' ~ E'^(.*)( \\1)+$'; > > > > what's worse: > > $ select regexp_replace( 'depesz depeszx depesz', E'^(.*)( \\1)+$', E'\\1' ); > > regexp_replace > > ──────────────── > > depesz > > (1 row) > > > > I know that Pg regexps are limited, but even grep's regexps match this > > correctly: > > whose grep? > > Postgres is BSD licence and that means they can't use the latest and > greatest GPL libraries. yes, I did use gnu grep. but it's hardly "latest and greatest" - there is nothing very special about this regexp, aside from the fact, that according to pg docs (how I read them) - it shouldn't match, but it does. depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/
В списке pgsql-general по дате отправления: