pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #8679: Error in regex function
3+ messages / 3 participants
[nested] [flat]

* BUG #8679: Error in regex function
@ 2013-12-13 08:12  spmpro@pochta.ru
  0 siblings, 1 reply; 3+ messages in thread

From: spmpro@pochta.ru @ 2013-12-13 08:12 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      8679
Logged by:          Andrzej
Email address:      spmpro@pochta.ru
PostgreSQL version: 9.2.0
Operating system:   Ubuntu
Description:        

Hi, I make command select regexp_replace('rewqe ','(?<=[q]{1})[e]{1}(?=[\-
$]+)','11');
and he return error 'invalid regular expression: quantifier operand
invalid', but regex is correct (check by http://gskinner.com/RegExr/). This
error repeat in another regex function (regexp_matches,
regexp_split_to_array).


But command select regexp_replace('rewqe ','[e]{1}(?=[\- $]+)','11') work
good. May be, regex construction (?<=\pattern\) is not support?



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #8679: Error in regex function
@ 2013-12-13 17:40  Tom Lane <tgl@sss.pgh.pa.us>
  parent: spmpro@pochta.ru
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2013-12-13 17:40 UTC (permalink / raw)
  To: spmpro@pochta.ru; +Cc: pgsql-bugs

spmpro@pochta.ru writes:
> May be, regex construction (?<=\pattern\) is not support?

It is not.  What we support is documented at
http://www.postgresql.org/docs/9.2/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP

I have no idea what "(?<=" is supposed to mean --- it's not a standard
regexp construct, for sure.  In general, "(?" is used to introduce
non-POSIX extensions that are specific to particular regexp
implementations.  There's some commonality there, but you should never
assume that such things are portable.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #8679: Error in regex function
@ 2013-12-13 17:53  Erik Rijkers <er@xs4all.nl>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Erik Rijkers @ 2013-12-13 17:53 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: spmpro@pochta.ru; pgsql-bugs

On Fri, December 13, 2013 18:40, Tom Lane wrote:
> spmpro@pochta.ru writes:
>> May be, regex construction (?<=\pattern\) is not support?
>
> It is not.  What we support is documented at
> http://www.postgresql.org/docs/9.2/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP
>
> I have no idea what "(?<=" is supposed to mean --- it's not a standard

FWIW, perl has these; see http://perldoc.perl.org/perlre.html (search for "Look-Around Assertions" ):

   (?<=pattern)   A zero-width positive look-behind assertion

   (?<!pattern)   A zero-width negative look-behind assertion.


It would certainly be nice if these would implemented in postgres...






-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-12-13 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-12-13 08:12 BUG #8679: Error in regex function spmpro@pochta.ru
2013-12-13 17:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-12-13 17:53   ` Erik Rijkers <er@xs4all.nl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox