Hi w,
Happy New Year, and thank you so much for solving this. I've hoped for this to come true for quite a while! And shame on me not even thought of using just simple comparison to get the ranged data! Ha!
Here is what's working now:
<<forEachTiddler
where 'tiddler.tags.contains("myTag") &&
(tiddler.title.replace(/(CC§)([\d]+)(\-?)([\d]?)/, "$2.$4") >= X) &&
(tiddler.title.replace(/(CC§)([\d]+)(\-?)([\d]?)/, "$2.$4") <= Y)'
sortBy 'tiddler.title' ascending
write '"\+\+\+["+tiddler.title.replace(/CC§/,"")+"]...<<tiddler "+tiddler.title+">\>===\n"'>>
so I can specify X and Y as the start and the end directly~ And also the hyphen of inserted articles are replaced as decimal dots, so that numeric comparison works all the time. (For example, I can specify X as a decimal "156.3" to refer to §156-3, so that this article can be used as a start point)
Thanks for this New Year present! Wish you get plenty of blessings too!
whatever於 2012年12月30日星期日UTC+8上午7時34分12秒寫道: