From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | matshyeq <matshyeq(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Regex "embedded options" does only work on the whole pattern? |
Date: | 2016-01-04 03:58:57 |
Message-ID: | 28321.1451879937@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
matshyeq <matshyeq(at)gmail(dot)com> writes:
> I can see postgresql claims to supports regular expression flags:
Yup.
> What I find don't makes sense to me is that those flags could be used to
> switch on/off match feature locally as opposed to the whole regex (same as
> though flags parameters of regex functions).
Not all of them would make sense locally; in fact I'd venture that
case-sensitivity is the *only* flag that anyone would consider using
that way.
> Perl supports that locality while postgres documentation says:
> "*An ARE can begin with embedded options: a sequence (?xyz) (where xyz is
> one or more alphabetic characters) specifies options affecting the rest of
> the RE.
Right. It says "begin with" and it means "begin with".
We are not Perl and are not attempting to be bug-compatible with its regex
engine. If you want bug-compatibility, see PL/Perl.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | subhan alimy | 2016-01-04 05:00:17 | Re: PostgreSQL GUI tools |
Previous Message | bricklen | 2016-01-04 03:49:14 | Re: PostgreSQL GUI tools |