Parse a string of text to remove part of the message

  • 1
  • 1
  • Question
  • Updated 1 month ago
  • Answered
  • (Edited)
I have a Zapier connection and mailbox that formatted emails are sent to be parsed for information to add a record into QuickBase...this issue is that our mail system adds a generic message to the end of the email that is getting picked up in the field of information. The message is always the same but the leading comments are different. I am trying to figure out how to get rid of the message at the end so that when the notification is sent out, this last part of the message is not in the comment box

The generic message that is added is the following

The information
contained in this message is privileged and intended only for the recipients named. If the reader is not a representative of the intended recipient, any review, dissemination or copying of this message or the information it contains is prohibited. If you have received this message in error, please immediately notify the sender, and delete the original message and attachments.

I have tried Left, Right, a combination of many. The issue is the comment before this may contain multiple sentences or periods so I am not able to break it at a punctuation point

Any thoughts?
Photo of Joey Zint

Joey Zint

  • 1,820 Points 1k badge 2x thumb

Posted 1 month ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,914 Points 50k badge 2x thumb
Joey,
Nice to hear from you.

Not tested but try this.

var text RawText = [my text field];

var text InsertPipe = SearchAndReplace($RawText, "The information contained in this message is privileged","|");

NotRight($InsertPipe,"|")

Photo of Joey Zint

Joey Zint

  • 1,820 Points 1k badge 2x thumb
You rock Mark...that did it.
Always fun to see use cases in the wild for tools that were only recently implemented. Sweet.