Folks,
I belive I have solved this repeated times, but it is an issue with the documentation that I cant find the answer again. Consider I have a string of text such as {{My heading||inner-link|!!!}} maybe something
, in fact it is a line in a tiddler text field.
So now I am writting a TiddlyWiki script that will use each line in which I can find ||inner-link|
then I will do something with the whole line. So All I want to do is to test if the string {{My heading||inner-link|!!!}} maybe something
to see if it contains the substring ||inner-link|
and leave me with the full string. Similar to testing for prefix or suffix.
Of course you will quickly see the contains operator is more a “list contains filter” ie; filter the input by searching list fields for a value.
The search operator operates accross tiddlers and fields.
I know I may be able to use regular expressions but I want the oportunity to provide the substring via a literal, variable or transclusion (reference). I think this is a missing operator? contains-string[]?
- Its fine if it is also the prefix, suffix, or only string.
I have created a contains-string[] operator based on the match[] operator and it works (tested)
- Care of ChatGPT