Forum Discussion

ZintJoseph's avatar
ZintJoseph
Qrew Captain
6 years ago

Parse a string of text to remove part of the message

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?
  • 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,"|")

    • AlexCertificati's avatar
      AlexCertificati
      Qrew Cadet
      Always fun to see use cases in the wild for tools that were only recently implemented. Sweet.