How to extract data between a word (UPDATE) and char "=======" using regex

Hi,

The mailbody that ill work with looks like this.

UPDATE Domestic Travel itinerary changed ================= .
The word UPDATE and the ===== is static everything between can change.

How do i get the text between UPDATE and the first =?

I have used the following regex.
System.Text.RegularExpressions.Regex.Match(strMejlBody,“UPDATE(?s)(.*)=”).ToString

and gets this result. Domestic Travel itinerary changed ================= .

regards
Milo

grafik
(?<=UPDATE)[\s\S]*?(?=\=+)

@Milo_Soderberg
try->

(?<=UPDATE)[\s\S]*?(?=\=*)

Hi ppr

ill get this error message when i try.
Multiple Assign: Can not assign ‘System.Text.RegularExpressions.Regex.Match(strMejlBody, “(?<=UPDATE)[\s\S]*?(?==+”).ToString’ to ‘strUppdateringMedRubrik’.

any ideas?

regards
Milo

unfortnately we don’t have enough context.

just test it on a single assing activity

strtext = System.Text.RegularExpressions.Regex.Match(strMejlBody, "(?<=UPDATE)[\s\S]*?(?=\=+)").Value

kindly note the \ and the ) within the regex pattern

Cross check immediate panel:

 System.Text.RegularExpressions.Regex.Match("ABC UPDATE Domestic Travel itinerary changed =================", "(?<=UPDATE)[\s\S]*?(?=\=+)").Value
 " Domestic Travel itinerary changed "