Application level validation. It will be interesting to see how that works 
out.

-- Mark

On Saturday, July 14, 2018 at 12:54:13 AM UTC-7, TonyM wrote:
>
> Mark,
>
> This actually seems to work really well. I always like to return the 
> favour so perhaps you will find this interesting and its implications.
>
> Place the following in a tiddler tagged $:/tags/ViewTemplate
> \define myregexp() ^\w+?\.\w+?\.\w+?$
> <$list filter="[title<currentTiddler>is[missing]]" variable=
> "missingTiddler">
> <$list filter="[{!!title}regexp<myregexp>]">
> Tiddler is missing and in w3w format<br>
> </$list>
> </$list>
> <$list filter="[title<currentTiddler>!is[missing]]" variable="null">
> <$list filter="[{!!title}regexp<myregexp>]">
> Tiddler is in w3w format<br>
> </$list>
> </$list>
>
> Now if a tiddler has a title of the form word.word.word the above will 
> display according to if it exists or not.
>
> Why is this so interesting?
> If someone comes to my online wiki using a link such 
> as mywiki.html#test.w3w.example
> they will open the tiddler mywiki.html#test.w3w.example if it exists
> if it does not exist they will presented with the missing tiddler, which I 
> can code to have a button appear on it, to help the user create the tiddler.
>
> This provides a way to guide a user into creating a tiddler that does not 
> exist by a title they provide, that meets a naming standard. It could be 
> firstname.surname
>
> Regards
> Tony
>
>
> On Saturday, July 14, 2018 at 3:43:00 PM UTC+10, Mark S. wrote:
>>
>> TT is the real expert, but this may get you started:
>>
>> \define myregexp() ^\w+?\.\w+?\.\w+?$
>> <<list-links "[regexp<myregexp>]">>
>>
>> Regexp is SOOO slippery.Without knowing more about your data, and your 
>> exact requirements, it's hard to know if this nails it. But you can test 
>> and tweak it and see what happens.
>>
>> If you ever need to extract strings, then you will need something similar 
>> to the solution in PR 2963.
>>
>> -- Mark
>>
>> On Friday, July 13, 2018 at 8:45:41 PM UTC-7, TonyM wrote:
>>>
>>> Folks,
>>>
>>> I have some tiddlers titled in the form name1.name2.name3
>>>
>>> I would like to test any tiddler title to test it is of this form, but 
>>> not sure how to do so, even after some research
>>>
>>> Basically is it three words separated by "." periods
>>> We can assume no other delimiters will be found such as spaces or [[ {{ 
>>> etc..
>>>
>>> I imagine a regex expression can do It, but I have not yet undergone 
>>> this self education
>>>
>>> I want to simply determine if it is true or not and reveal/listWidget 
>>> some wiki text, 
>>>
>>> however one day I may want to extract the three words.
>>>
>>> Thanks in advance
>>> Tony
>>>
>>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
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/6ad33cd7-c20b-4ea6-ac3e-755503564afa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to