From: "Ken Tanzer" <[EMAIL PROTECTED]>
> 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. the results of mixing greedy and non-greedy repetitions can be difficult to predict. try SELECT substring('X12345X' FROM '\\D*(\\d{1,5}).*?'); gnari ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]