Please help me to extract the text after the last occurrence of the Schedule :
and the end of the line.
Lane Closures : Lane one will be closed
Reason : Roadworks are planned
Status : Pending
Schedule : Expect disruption everyday between 20:00 and 06:00 from 5 October 2020 to 9 October 2020
Schedule : Expect disruption everyday between 20:00 and 06:00 from 12 October 2020 to 16 October 2020
Schedule : Expect disruption everyday between 20:00 and 06:00 from 19 October 2020 to 23 October 2020
Schedule : Expect disruption everyday between 20:00 and 06:00 from 26 October 2020 to 31 October 2020
Lanes Closed : There will be one of two lanes closed
In the above case, I need to extract Expect disruption everyday between 20:00 and 06:00 from 26 October 2020 to 31 October 2020
So far I came up only with the following:
(?<=Schedule : ).*(?![\s\S]*Schedule)
But it doesn't work in Postgres. It returns error:
invalid regular expression: invalid escape \ sequence
I also tried to replace \s
and \S
with [:space:]
and ^[:space:]
as per Postgres documentation but it doesn't work either
Thanks in advance.