Locating CR's / LF's in an email text string
Posted: 26 Aug 2014 07:57
Hi all,
I'm in the process of creating a flow that will read out loud a received email.
Accessing the received email contents is straightforward by using the system variable: "notification_text".
However, the problem I'm trying to overcome is that "notification_text" displays the entire contents of the email as just a single string ... whereas I'd like to separate the single string of text back into it's original multiple line format.
E.g. The "notification_text" string contains the following:
"John Test This is a test email"
(where "John" = senders name, "Test" = email subject and "This is a test email" = email body).
But if I view "notification_text" in AM's text editor, I see the contents displayed like this:
John
Test
This is a test email
which is exactly what I need.
Obviously, AM's text editor is able to detect the embedded CR's / LF's hidden within the string "John Test This is a test email" and split it into individual lines.
So my question is whether there's some way that I can manually process the "notification_text" variable by searching for CR / LF occurrences and split the single string back into individual strings ?
Thanks in advance,
Steve
I'm in the process of creating a flow that will read out loud a received email.
Accessing the received email contents is straightforward by using the system variable: "notification_text".
However, the problem I'm trying to overcome is that "notification_text" displays the entire contents of the email as just a single string ... whereas I'd like to separate the single string of text back into it's original multiple line format.
E.g. The "notification_text" string contains the following:
"John Test This is a test email"
(where "John" = senders name, "Test" = email subject and "This is a test email" = email body).
But if I view "notification_text" in AM's text editor, I see the contents displayed like this:
John
Test
This is a test email
which is exactly what I need.
Obviously, AM's text editor is able to detect the embedded CR's / LF's hidden within the string "John Test This is a test email" and split it into individual lines.
So my question is whether there's some way that I can manually process the "notification_text" variable by searching for CR / LF occurrences and split the single string back into individual strings ?
Thanks in advance,
Steve