I _may_ have found a problem that is affecting non-greedy regex matches. select regexp_matches( $$x = foo y x = foo y $$, $$x\s+(.*?)y$$ ,'g');
As I read it, this should match ' = foo' twice. Instead, it matches "= foo y x = foo " once. The non-greedy form (.*?) should break out at the first 'y'. Interestingly, this works: select regexp_matches( $$x = foo y x = foo y $$, $$x(.*?)y$$ ,'g'); It's the same regex minus the space after 'x'. merlin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs