Thanks Mark S.

VERY helpful illustration!

Has anyone ever asked on GH to add ability to use Regex capture groups 
directly in filters? 

They are very useful as you are able to define in a regex exactly what you 
need back. In effect they 
could do your solution in, basically, one move.

Just wondering
TT 


Mark S. wrote:
>
> There are no core tools for extracting sections identified by regular 
> expressions directly. Instead you
> have to apply various levels of splitting, identifying, extracting 
> (sometimes using nth operator). The actual
> separator gets thrown away -- the opposite of what would be convenient for 
> extracting text.
>
> So, if there were macros in tiddler test1, then this works (in my test) :
>
> <$list 
> filter="[[test1]get[text]splitregexp[\n]regexp[^\\define]splitregexp[^\\define]!is[blank]]"
>  
> variable="splitme">
> {{{ [<splitme>splitregexp[\(.*?\)]first[]] }}}<br/></$list>
>
>
> So stuff gets split into lines. Then matching lines are identified. Then 
> split. Compressed. Used in {{{ }}} where they are split again by 
> (parameter), but this time only the part before the split is saved.
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/80f98f3b-4d0f-4f1f-a141-1e4ede1aaba0%40googlegroups.com.

Reply via email to