Node red string functions

I’m writing a function to read emails from Octopus energy and using a function extract the times for said free electricity. Their emails have a subject as so…. “Free electricity 11-12pm Sunday 5th October” I need to extract the time and date part. Setting up the control panel schedule part is easy.

Simply put extract “11-12pm Sunday 5th October” from “Free electricity 11-12pm Sunday 5th October”

Make a function block and use the slice function.

On this link “https://www.w3schools.com/js/js_string_methods.asp” you find all info how to do this.

Hi Stephan, Sorry, When I click on the link I just get “We can’t seem to find the resource you’re looking for.”

Link

Outstanding! Many thanks Stephan.