I'm having trouble figuring out how to write a regex in Snowflake that will return the last 7-digit number from a string. Non-working example:
SELECT REGEXP_SUBSTR('4000400 - Widget Revenue:4000401 - Special Widgets:4000422 - Tiny Special Widgets', '\D*\d+\D+(\d+).*')