TT - that does seem to work! Great!!!

For anyone curious, I have this:

A tiddler with this arbitrary text

title:tid
text: Welcome to TiddlyWiki <<foo , a unique [[non-linear]] xx <<foo 
bar>>notebook 
for. 

And this is my testing code (at the moment):

<$set name=re value='(<<foo([^>])*?)([<]{2})'>
<$set name=txt filter='[[tid]get[text]]'>
txt: <<txt>><br><br>
list: <$list filter="[{tid}regexp<re>splitregexp<re>]">

</$list>
<br>
<$set name=pre filter="[{tid}regexp<re>splitregexp<re>first[]]">
pre:<<pre>>
<br><br>
<$set name=target filter="[{tid}regexp<re>splitregexp<re>nth[2]]">
target: <<target>>
<br><br>
<$set name=post filter="[{tid}regexp<re>splitregexp<re>rest[2]]">
post: <<post>>
</$set>
</$set>
</$set>
</$set>
</$set>

To be clear, the application in EditorMagic is to be replace the incomplete 
macro call with a complete one and to keep the surrounding text (the pre 
and the post) intact. In the above setup, the "target" contains

 <<foo , a unique [[non-linear 
<http://editormagic2.tiddlyspot.com/#%3C%3Cfoo%20%2C%20a%20unique%20%5B%5Bnon-linear>
 xx 
]]

Other than the added square brackets that mess up the link ([[non-linear]]) 
I'll have to split the real target, i.e <<foo from the rest and prepend the 
rest to the "post" text. So ideally, the regexp would cover that IF it says 
"<<foo blabla <<" THEN it should ONLY capture "<<foo" rather than include 
the blabla with it. I'm guessing this is too complex for a regex and will 
have to be done manually. 

<:-)


-- 
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/a6ada870-068f-4112-921e-fd8a6fdac95f%40googlegroups.com.

Reply via email to