On Saturday, August 15, 2015 at 7:20:12 AM UTC+2, John wrote:
>
> Still does not explain why regex pattern "{{[a-zA-Z0-9]*}}" does not yield 
> the same results.
>

Because regexps are difficult.  

You don't allow spaces. So your regexp breaks if it hits the first space. 
... and TW pattern matching also uses regexps. So there are some 
limitations. eg: tiddler titles that contain wikitext closing delimiters 
as: ] ]] } }} and so on need to be escaped or even better avoided by the 
user. 

Your regexp means: 

// {{[a-zA-Z0-9]*}}
// 
// Options: case insensitive; ^ and $ match at line breaks
// 
// Match the characters “{{” literally «{{»
// Match a single character present in the list below «[a-zA-Z0-9]*»
//    Between zero and unlimited times, as many times as possible, giving 
back as needed (greedy) «*»
//    A character in the range between “a” and “z” «a-z»
//    A character in the range between “A” and “Z” «A-Z»
//    A character in the range between “0” and “9” «0-9»
// Match the characters “}}” literally «}}»

Please have a look at: 
http://tiddlywiki.com/#regexp%20Operator%20%28Examples%29

There you can see, that your regexp has no chance to work, doe to the above 
mentioned TW design decisions. TW uses brackets [] to detect wikitext. 

The advanced search field pattern, you want would need to look like this: 
[regexp[{{[a-zA-Z0-9 
]*}}]]    <- I did add a space.

.... BUT ... see the last example. 

Since TW wikitext detection also uses brackets [] and curly bracktes {} as 
delimiters, the last example doesn't work either out of the box. 

But luckily js regexp knows unicode. where { is \u007b  and } is \u007d

So you may have more luck with:
 
<$set name="digit-pattern" value="""\u007b\u007b[a-zA-Z0-9 
]*\u007d\u007d""">
<<list-links "[regexp:text<digit-pattern>]">>
</$set>

OR

Use "trans" or "{{" or "}}" in the standard search field. 

have fun!
mario


-- 
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bb8e1a4d-ee4f-4049-a140-16a0b7240a66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to