Hi,
i have an email body converted to text from html but the body contains 2 embeded images so the start and the end of the body is [cid:ismage001.jpg@01Da58sd5D1.A6FaaD87F0] or something like.
so the body is :
[cid:ismage001.jpg@01Da58sd5D1.A6FaaD87F0]
Email text bla bla
Email [text bla bla22]
Email text bla bla
Email [text bla bla33]
[cid:ismage001.jpg@01Da58sd5D1.A]
i want to keep only the text and remove from the beginning and from the end [cid:ismage001.jpg@01Da58sd5D1.A6FaaD87F0] and [cid:ismage001.jpg@01Da58sd5D1.A] because i want to build another email to send with my images.
So, what is the function to skip first n-chars and remove the the last?
I did alot of mess because there are many [ ] and not the only ones at the begenning and at the end
Maybe i have to array the brackets and remove the first and last? How to do that?
Sorry for bad English
Solved! Go to Solution.
Let's say that a variable call varText contains the following:
"[cid:ismage001.jpg@01Da58sd5D1.A6FaaD87F0] Email text bla bla Email [text bla bla22] Email text bla bla Email [text bla bla33] [cid:ismage001.jpg@01Da58sd5D1.A]"
then the following formulas will strip out the beginning and ending image designation.
substring(variables('varText'),Add(indexOf(variables('varText'),']'),1)) substring(outputs('Compose'),0,lastIndexOf(outputs('Compose'),'['))
put the first in a Compose action. That strips off the front. Then put the second in another Compose action. That takes the result from the first Compose and strips off the last.
If you know how many characters you need to strip off each end then you can use Substring(text, startindex, length).
If you don't know, but know what needs to be stripped out then you can use a combination of Substring(), IndexOf, and LastindexOf to find the locations of the start or end of what needs to be stripped out and calcu.ate from there.
Yeah, can you explain me better in my case how to apply this functions giving me an exemple?
Thnak you
Let's say that a variable call varText contains the following:
"[cid:ismage001.jpg@01Da58sd5D1.A6FaaD87F0] Email text bla bla Email [text bla bla22] Email text bla bla Email [text bla bla33] [cid:ismage001.jpg@01Da58sd5D1.A]"
then the following formulas will strip out the beginning and ending image designation.
substring(variables('varText'),Add(indexOf(variables('varText'),']'),1)) substring(outputs('Compose'),0,lastIndexOf(outputs('Compose'),'['))
put the first in a Compose action. That strips off the front. Then put the second in another Compose action. That takes the result from the first Compose and strips off the last.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
31 | |
15 | |
13 | |
12 | |
7 |
User | Count |
---|---|
39 | |
24 | |
16 | |
10 | |
7 |