[tw5] Filter operand characters for newline or linebreak?

74 views
Skip to first unread message

Mat

unread,
Jun 17, 2016, 10:15:49 AM6/17/16
to TiddlyWiki
+[splitbefore[-]]

...works great for splitting before (or actually, after) the "-" character. 

But what do I put in its place to split at newline or paragraph breaks? I've searched around and cannot find any solution.

I've also attempted to use regexp[], where it is easy to symbolize e.g paragraph breaks in the operand - but the output of a regexp seems to always be the full input so there is no way to split at the operand. Or are there any ways to make regexp actually manipulate the input?

Thank you!

<:-)

Jed Carty

unread,
Jun 17, 2016, 12:27:04 PM6/17/16
to TiddlyWiki
For me this works:

<$list filter='[[bob
joe]splitbefore[
]]'>

</$list>


Mat

unread,
Jun 18, 2016, 6:50:53 AM6/18/16
to TiddlyWiki
Thanks Jed. Is it just my guess or is that more of a "trick" than a real solution? Ideally it would be a solution where I can insert any representation of a character (e.g it's ascii nr or hexcode or regexp form or any of the other established "code representations").

Or, as noted, even better if one can use the regexp filter operator but have it output the actual result rather than just the whole title that "fulfills" the result. (...isn't that kind of the point with regexp? To get the actual result?)

Anyone?


<:-)
Reply all
Reply to author
Forward
0 new messages