Script to Extract a number from a text string in Vertica

Vertica includes regular expression searches as part of their standard product. This makes it easy to extract numbers from text strings.

dbadmin=> SELECT regexp_substr('The years is 2014.', 'd+',1) as OfferID;
OfferID
---------
2014
(1 row)