Using Postgres V. 7.4.1, the following query:
SELECT substring('X12345X' FROM '.*?([0-9]{1,5}).*?');
Returns '1'. I would expect it to return '12345'. Is this a bug, or am I missing something? Thanks.