Hi again BTC,

\define snr(source:"", searchValue:"", replaceValue:"")

\whitespace trim
<$vars 
 src  =<<__source__>>
 sval =<<__searchValue__>>
 rval =<<__replaceValue__>>
>
<$list filter="[<src>search<sval>]" emptyMessage="""<$text text=<<src>> />"""  >
<$list variable="p1" filter="[<src>splitbefore<sval>]">
<$list variable="p2" filter="[<src>removeprefix<p1>]">
<$list variable="p3" filter="[<p1>removesuffix<sval>addsuffix<rval>]" 
emptyMessage="""<$text text=<<src>>/>"""> 
<$text text=<<p3>>/>
<$macrocall $name="snr"

source=<<p2>>
searchValue=<<sval>>
replaceValue=<<rval>>
/>
</$list>
</$list>
</$list>
</$list>
</$vars>
\end 


The above is the final snr macro! As you see the splitbefore actually get 
the source and find the character, word, pharse. It seems case-sensitive, 
so for case-insensitive search
I dont know how can I revise the code to distinguish this!

--Mohammad

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0baa7eb6-9a8d-4d7a-aea1-2e6452261b26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to