On 7/7/14 5:25 PM, David G Johnston wrote:
> SELECT
> (SELECT (regexp_matches('1.3', '([0-9\.]*)'))[1])::float
> +
> (SELECT (regexp_matches('2.3', '([0-9\.]*)'))[1])::float
> ;
>
> Suggest wrapping it in a function - or making a "regexp_matches_single"
> function that behaves similarly but returns a single text[] instead of a
> SETOF text[]
In this case, it would be easier to use substring(string from pattern).
.marko