I have a text column (emailbody) in a table (notification) which keeps a record of the HTML that went out for a particular email. Somewhere inside that HTML file, there is a line of text that contains the following line:
Delayed ${shipmentId} for Carrier
Where ${shipmentId}
represents the specific Id that was generated for that particular record. Example: 12345
Basically I want to query the column in the table for all the shipmentId values, which unfortunately will involve getting the string positions between Delayed
and for Carrier
. I understand this will likely involve using one of Postgres' regular expression functions but I'm not quite sure how to do it, or if there's something a little simpler.