Может быть
SELECT regexp_matches('[UFC_LOC-1001]_IGT_MISO_20191212_115w_20191213 (en-us - de-de)', '([A-Z]{3,4})_([0-9]{8})');
┌─────────────────┐
│ regexp_matches │
╞═════════════════╡
│ {MISO,20191212} │
└─────────────────┘
(1 row)
SELECT r[1] as project, r[2]::date as date
FROM (SELECT regexp_matches('[UFC_LOC-1001]_IGT_MISO_20191212_115w_20191213 (en-us - de-de)', '([A-Z]{3,4})_([0-9]{8})') r) s;
┌─────────┬────────────┐
│ project │ date │
╞═════════╪════════════╡
│ MISO │ 2019-12-12 │
└─────────┴────────────┘
(1 row)
другой вариант:
SELECT (regexp_matches(file_name, '([A-Z]{3,4})_[0-9]{8}'))[1] AS project,
(regexp_matches(file_name, '[A-Z]{3,4}_([0-9]{8})'))[1]::date AS date
FROM data;
┌─────────┬────────────┐
│ project │ date │
╞═════════╪════════════╡
│ MISO │ 2019-12-12 │
└─────────┴────────────┘
(1 row)