substring regular expression - Mailing list pgsql-novice

From Barry Brunning
Subject substring regular expression
Date
Msg-id 9AC7EDC5-5C1A-4A3A-9B4D-F7F1FB691656@datastream.com.au
Whole thread Raw
Responses Re: substring regular expression  (Sergey Konoplev <gray.ru@gmail.com>)
List pgsql-novice
Dear Colleague

This works (returns 12345):
select substring('ABC 12345 XYZ' from '%#"[0-9][0-9][0-9][0-9][0-9]#"%' for '#') as found_5_digits;

While this fails (returns blank):
select substring('ABC 12345 XYZ' from '%#"[0-9]{5}#"%' for '#') as no_5_digits;

Am I misunderstanding the documentation on using [0-9]{5} or do you think it's a bug?

TIA

--------------------------------------------------------------------------------------------------------------------------------------------------------------
Barry Brunning | Data Stream Pty Limited | p/f. +612 9982 3550 | w. http://www.datastream.com.au





pgsql-novice by date:

Previous
From: Thara Vadakkeveedu
Date:
Subject: Re: Uninstall postgresql 9.2 on red hat linux
Next
From: Sergey Konoplev
Date:
Subject: Re: substring regular expression