No internet connection
  1. Home
  2. General

Extract until carriage return

By @fredfrag2021-06-15 09:36:16.709Z

Hi
On version 5 it appears to process all emails as plain text.
Therefore as a scenario in HTML I may see

      WARD: maternity

in plaintext I see

      WARD:
      maternity

How can i extract until a carrage return or new line ?

kind regards

  • 1 replies
  1. L
    Liam @liam2021-06-18 10:10:27.813Z

    Hi

    It's worth noting that TA4 only extracted the plain text version of the mail. Unless you set up a specific scenario to push the HTML to a trigger.
    In TA5 you can customise this in the field extractions.

    Msg_Body is the plain text Msg_Html is the html content. (please bear in mind that the HTML version will contain all HTML tags, so you would need to account for this in any extraction and it is often much easier to build the extraction based on the plain text form instead)

    I would recommend that you build the trigger extractions based on the plain text version, once you process a message for the first time it is easy to see this within the TA Studio.
    Go to the message store, find the message in question and double click it to open the view.
    It should default you to the Message Text tab at the bottom, this is the plain text version, you can then copy this and paste it into the extracted fields action to see how your extractions will function.

    For your specific noted example, I'd probably "extract until" - "Until these characters" then enter the field or text that comes after the WARD value
    e.g.