Postgresql, get string after multiple ':' character -
i have following column entries
01:02:02:02 02:01:100:300 128:02:12:02
i need way choose parts want display
01:02:02 02:01:100 128:02:12
output or
01:02 02:01 128:02
i tried suggested solutions in similar questions without success like
select substring(column_name, '[^:]*$') table_name;
how work?
to first 3 parts, can use
select substring(column_name '^(([^:]*:){2}[^:]*)') table_name;
for first 2 parts, omit {2}
. first 4 parts, make {3}
.
Comments
Post a Comment