Remove outlook footer

board approvals should be removed that is

Where do I put this one:
text.split(“Email Legal Notice”)(0)

In an Assign activity instead of this
System.Text.RegularExpressions.Regex.Replace(text, “(?i)(?<=Email Legal Notice:)[\s\S]*”, “”).Trim().Split(“Email Legal Notice”)(0)

1 Like

Happy to Help.
thanks

1 Like

Hi @prashant1603765 ,
Can you please help with the pattern that removes that string only

I want a solution that will remove all this

Could you provide the full input txt file ?

This would be the input:
New Text Document.txt (1.8 KB)

So in that input I only want: “Hello there!”

Ok got it just use this:

regex.match(input, “^(.*?)(?=Email Legal Notice:)”, regexoptions.singleline Or regexoptions.ignorecase).value.trim

1 Like

@anelisa_bolosha1 The simpler solution is provided by Bhavesh, by splitting the message body.

Please follow the steps to get the desired result.

Assign String Variable

StringText = StringMessage.split(“Email Legal Notice:”)(0).Trim

2 Likes

that was one method -split returns a plain cut based on exact text match;
regex allows flexible, case-insensitive search and can use patterns to match complex text.

3 Likes

It worked thanks a lot

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.