방법을 더 알아내면 추후에 내용을 계속 추가해보겠습니다.
with t(description) as (values
('서울시-병원'),
('서울시-야간-병원')
)
SELECT description,
substring(description, position('-' in description) + 1),
-- substring(description, strpos(description, '-') + 1),
-- substring(description from position('-' in description) + 1),
substring(description, '-(.+)'),
substring(description, '[^-]*$') as regex_sub,
substring(description from '(?<=-)[^-]*$') as positive_lookbehind,
substring(description from '(?<=-).+(?=-)') as find_middle
FROM t
posititon
은 ANSI 표준에 속합니다.