Try this You’ll get the result as expected
original_sentence = “Error Message Bar No hits were found for storage location 1002 in plant 1110No hits were found for storage location 1002 in plant 1110View Details”
result_sentence = original_sentence.replace("Error Message Bar ", “”).replace(“View Details”, “”)
There are a few options here. Firstly you can try regular expressions (regex). Try websites like regex101 to help figure out what that regular expression is, and you can use the activity “IsMatch” within your workflow.
Otherwise if you can guarantee you are always removing exactly “Error Message Bar” from the beginning and “View Details” from the end, you could use Substring or Trim to manually format the string.
Please try these methods and see what works best for you.