You have to login in order to post a reply to this topic.

1 reply [Last post]
WillDee
User offline. Last seen 2 weeks 1 day ago. Offline
Joined: 04/18/2010
Posts: 13

It would be nice to be able to set up some parameters for the Text Replace action so we can mimic some of the more complex regex functions.

eg.  An option set to:

only replace the first match,

replace x matches,

replace all matches.

Thomas Minitsios
User offline. Last seen 1 year 4 weeks ago. Offline
Joined: 07/16/2009
Posts: 34
Re: New Text Replace action option(s)

Hello Will,

I have already answered to the email that you sent to the support department and I attached a sample job that implements the functionality that you described. I am also attaching the specific job here for anyone that may want to do the same thing. The specific solution is rather general: you only have to set 4 variables at the beginning of the job:

%SampleText%: The text that will be manipulated.
%NoOfOccurrencesToReplace%: This is where you set how many occurrences of the word you would like to replace.
%TextToReplace%: This variable must contain the text that must be replaced.
%SubstituteText%: This variable must contain the word that will be used to substitute the value of %TextToReplace%.

AttachmentSize
Replace Only A Specific Number of Hello Occurrences.waj 16 KB