I have one text column that have this type of value
---
cart_id: 23332251
id: 1824
push:
key:
last_checked_in_at: 2019-03-04 10:39:53.946659000 Z
other_field: hello
I want to have a column with only last_checked_in_at and extract the value as 2019-03-04 10:39:53.946659000
I tried
SELECT substring(object FROM '.*last_checked_in_at: (.*) Z') AS last_checkin_at, *
FROM versions;
But I get the begging of the field but it never stop and take the rest of the lines below.
I tried substring(object FROM '.*last_checked_in_at: (.*) Z$') but I get NULL. I am on PostgreSQL 10.
substring(object FROM '(\d*-\d*-\d* \d*:\d*:\d*\.\d*)')but I would to understand why it is not working with the one bellow.