Wildcard in search-replace filter or text-operation

Hello Tiddlywikians,
is there a trick to use a wildcard character in complex search-replace text operations?
I would need something like this:

\define replace-action() <$action-setfield text={{{ [all[current]get[text]search-replace:g:<in>, <out> }}}/>
\define replace(variable)
<$vars() in="start $(variable)$ *wildcard* end" out=... >
<<replace-action>>
</$vars>
\end
<<replace "test">>

The idea is based on the macros of @stobot 's sticky-plugin

Thanks and best wishes Jan

1 Like

You can use a regexp search-replace where either .* or .+ would be your wildcard.

For zero or more characters, try

start $(variable)$ .* end 

or, for one or more characters:

start $(variable)$ .+ end

then:

search-replace:g:regexp<in>,<out>

Note, I left the spaces intact in the expression as you wrote them which may or may not be what you require.

1 Like

Hi CodaCoder, thanks for showing me the syntax. I could not check it yet, because there are other things still in my way.
Off-Topic here: If I want to work with wikis on the smartboards and smartphones, I cannot use modifiers. Is there a different way to distinguish between actions…like clicking longer than a second or so. I guess that is subject for a different thread.

Yes … Should definitely be a new thread. … And please explain there, what you mean with “modifiers”. … My guess: CTRL SHIFT and so on?!