a colums include code like 'a357' , 'b123' with many word and i want to extract them it work with
select *, regexp_matches(col1,'a\d{3}') from table
but i also want the 'b123' code then i write this code not work:
select *, regexp_matches(col1,'(a|b)\d{3}') from table
where as (a|b) is regex. Please show me solution or any other way not regexp_matches because i need to trim '{}' sign after that.
'[ab]\d{3}'or'(?:a|b)\d{3}'