Pages: 1
RSS
A little lost with REGEXP, Trying to work out how to reduce a string
 
I have a rather complex string I would like to shorten and forward to an SMS gateway. initially the message came from a LoRa gateway that sends in HTML format and to be honest it is a real mess. Thankfully The Bat takes care of most of that and chops is down to plain text. however there is still information that is not needed.

The string is Alert FSI-Temp 3 (641093042320)Content:The temperature is 42 ℃, which has exceeded the threshold 30 ℃.Date:2019-10-12 14:55:44 UTC+10Temperature:42.8 ℃Humidity:19.5 %Note: The listed data was updated at 2019-10-12 14:55:24 UTC+10  iOS Android Official Website  Ursalink Cloud  Contact Us


All i really need from that is something like this..



Alert FSI-Temp 3 (641093042320) Temperature:42.8 ℃Humidity:19.5 %
Threshold exceeded 30 ℃.
Date:2019-10-12 14:55:44 UTC+10

FSI-Temp 3 is the Name of the sensor and will change
(641093042320) is the ID of the sensor and will change

Would anyone please be able to assist me in creating an expression to filter this information so it can be forwarded to the SMS gateway.

Regards
Andrew
 
Sadly I suck at RegEx, so I cannot help you, but the good news is that Regular Expressions are a universal language and The Bat is only one of thousands of applications that use them. So, if you cannot find the answer here, you could also ask your question in basically any forum dedicated to programming in general or to RegEx in particular.
I volunteer as a moderator to help keep the forum tidy. I do not work for Ritlabs SRL.
Pages: 1