Replace X instead of Replace All

In a text string like “MANHATTAN” i want to replace the first occurance of letter T
This would give “MANATAN” remaining which is my goal
However, since the only block working to “Replace something” is the Replace All - Both of the Ts are removed which obviously give “MANHAN” - Which is not what i want

Even tried to give the letter T an index however, since the only way to remove T is still Replace All, both Ts are removed, even though an index is involved.

Simple silly thing and i am sure someone out there has a great solution -
I could not find it here though… Any suggestions ?

PS: (“Replace all” in combo with “First occation of” does not work as “ALL” is still replaced.

I go nuts :smiley:

Hey @stefansladdeneng1

this will work for your described use-case of “Remove first occurrence of”

Here’s a sample:
https://x.thunkable.com/copy/d74e8b40f7df3d8bdb1e9bf8b4105f19

Let us know whether or not that works

Hello Domhnall
Worked fine - Had to tweek it to my exact purpose.
I suggest an update the docs with a few use cases to use when Replace text.
Or even better, add a “Replace” block to complement “Replace All”
Again Thanks…

1 Like

Glad it’s working for you anyway Stefan!


Or…even better…a RegEx block :smile: