Mark, I mean just use <variable>, See the below revised code

\define ViewTiddlerAppended()
<$set name=shortpath filter="[<viewpath>splitregexp[^(.*?).$]]" select=1 >
<<shortpath>>. Nice to see you.
</$set>
\end

<$vars viewpath="$:/plugins/felixhayashi/tiddlymap/graph/views/map" >

<<ViewTiddlerAppended>>

</$vars>



On Monday, August 19, 2019 at 6:23:28 PM UTC+4:30, Mark S. wrote:
>
> Statements like
>
> {{<<variable>>}} 
>
> don't work, so I assume that the filter equivalent, {<variable>} also 
> doesn't work.
>
> When I test this latter form, it doesn't work.
>
> The $(...)$ substitution approach almost always does what I originally 
> intended, so I tend to stick to it, perhaps more than I need to.
>
> Thanks!
>
> On Sunday, August 18, 2019 at 11:09:45 PM UTC-7, Mohammad wrote:
>>
>> To Josiah,
>>
>> This is an example of using regexp in Tiddlywiki worth to be included in 
>> your regexp tutorial!
>>
>> @Mark
>> Why not just using <viewpath> instead of {$(viewpath)$}
>>
>> --Mohammad
>>
>> On Monday, August 19, 2019 at 1:59:13 AM UTC+4:30, Mark S. wrote:
>>>
>>> This variant uses the new splitregexp operator to eliminate the last 
>>> character:
>>>
>>> \define ViewTiddlerAppended()
>>> <$set name=shortpath filter="[{$(viewpath)$}splitregexp[^(.*?).$]]" 
>>> select=1 >
>>> <<shortpath>>. Nice to see you.
>>> </$set>
>>> \end
>>>
>>> <$vars viewpath="$:/plugins/felixhayashi/tiddlymap/graph/views/map" >
>>>
>>> <<ViewTiddlerAppended>>
>>>
>>> </$vars>
>>>
>>>
>>>
>>> On Sunday, August 18, 2019 at 11:49:19 AM UTC-7, MagoArcade wrote:
>>>>
>>>> Let's say "$:/plugins/felixhayashi/tiddlymap/graph/views/map" contains 
>>>> the text "{line 1} Hello World}" (note the curly bracket)
>>>>
>>>>
>>>> \define ViewPath()
>>>> $:/plugins/felixhayashi/tiddlymap/graph/views/map
>>>> \end
>>>>
>>>>
>>>> \define ViewTiddlerAppended()
>>>> {{$(ViewPath)$}}. Nice to see you.
>>>> \end
>>>>
>>>> How do I get <<ViewTiddlerAppended>> to read:
>>>>
>>>> "{line 1} Hello World. Nice to see you."
>>>>
>>>> (i.e. remove the last character of the text in the tiddler)
>>>>
>>>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d02c0a8b-c7a6-4276-932f-bb19436c9ce5%40googlegroups.com.

Reply via email to