AnsweredAssumed Answered

Removing Multiple image and URL references of varying length within large text string

Question asked by garyjones on Feb 6, 2019
Latest reply on Feb 7, 2019 by garyjones



I have a parsed email text string consisting of multiple blocks of text at the end of which are references to [image:Twitter], [image:Facebook] and sometimes [image: Google Plus] each of which is followed by a URL reference (see below) -


"[image: Google+]









I would like to remove all references to the images, the URL text that follows each and replace the last with a ¶ as part of an auto-enter calc on a text field. Note, that prior to and after each similar text string is text I wish to keep.


It's easy to remove the image references using -


Substitute ( Self ; ["[image:"; ""]; ["Facebook]"; "¶"];["Twitter]"; "¶"];["Flag";""];

["as irrelevant"; "¶"];["Google Plus";"¶"])


It's not unreasonable to assume that the line break after ":" and prior to "Facebook" or "Twitter" may not always exist so wanted to create a catch-all for each instance.


However, I can't work out how to remove the URL text that follows the length of which will always vary. I've tried Word count etc but to no avail.


All help appreciated as always.




Best wishes