Mat, where you set a *regex* in a field or variable one should just use the 
full standard regex notation, including regex escapes when needed I think. 
If you run escaperegex over those it will mess them up in a potentially 
confusing fashion.

As far as I understand it the escaperegexp is for situations like titles 
where you want to suppress regex behaviour so they can be processed as pure 
text. Something like that.

My 2 cents
TT

On Wednesday, 1 July 2020 14:18:47 UTC+2, Mat wrote:
>
> @TiddlyTweeter, 
>
> I did find that it was not solved previously after all. Basically to not 
> use escaperegexp is insufficient - but using escaperegexp puts 
> escapecharacters on / characters where they should not be which also 
> doesn't work! I think the escaperexep operator needs to be modified but I'm 
> not sure how to formulate it.
>
> Anyway, only thanks to your post (THANK YOU!) do I now have a filter that 
> does it:
>
> The field closures contains: /> </$
>
> <$set name=esc
>   value={{{ 
> [enlist{!!closures}escaperegexp[]join[|]addprefix[(]addsuffix[)+]split[\/]join[/]]
>  
> }}}
> >
>  {{{ mystring +[regexp<esc>] }}}
> </$set>
>
> mystring can now contain either of /> or </$ and be accepted by the 
> regexp operator.
>
> Again, thank you TT!
>
> <:-)
>

-- 
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/b36d1e41-f257-4b27-93db-a180ba152b88o%40googlegroups.com.

Reply via email to