So I’d like to set a list of terms for find and replace as variables somewhere in my make flow
for example a variable called ‘twitter hashtags’ with the value: “#booktok” → “#booktwitter”, “#crimetok” → “#crimetwitter”
I’d then like to make a step where text parsed through that variable would automatically replace the relevant terms in a case insensitive manner. So any instances of #booktok or #bookTok for example in the input would become #booktwitter
How can I achieve this? I was using chatgpt but it’s unreliable / often produces wild rewrites that I didn’t ask for. It feels like there should be an easier way of doing this that would let me manage all those variables separately so I can add to them over time
Hi @spoilts ,
You could use a Data Store to achieve this.
Enter all of your “#…tok” and “#…twitter” hashtags into a new data store.
And then within your scenario (1) Search for all data store records, (2) iterate through the returned records, and (3) find and replace your “#…tok” with “#…twitter” hashtags.
Please let us know how you get on!
1 Like
Hi @spoilts ,
If all your hashtags end in “tok” and just need to be replaced with “twitter”, then another alternative is to use a regular expression to replace “tok”.
A regular expression like this would match just the “tok” at the end of any hashtag:
(?:#.+?(tok\b))
1 Like
Would I be able to differentiate between different replacement options for different paths? For example, I’m developing a crossposter from Tiktok to Twitter/Instagram. All three platforms have very different hashtag conventions, so I’m trying to autoreplace the original with the equivalents for each platform route
Hi @spoilts ,
Would I be able to differentiate between different replacement options for different paths?
Yes. If you use the Data Store method, you can add a column for each platform, so that you can specify a different hashtag to use in each platform. Depending on the direction of cross-posting, you’d then replace the hashtag in the Twitter column, with the TikTok one, or replace the TikTok one with the Insta one etc.
2 Likes
How many hashtag you are trying to replace this with? If it is few, then you can always use the switch module, or else, the one suggested by @Terry_Hopper will be the best solution.
Alternatively, you can also use GSheet with this.
2 Likes