I am trying to find out which of 3 separators ( *-* or */* or *.* ) is 
being used in a string.

The result of the below gives the title that matches.
1= <$list filter="[[12.34]] +[regexp[(-|/|\.)]]"></$list>

2= <$list filter="[[23-45]] +[regexp[(-|/|\.)]]"></$list>

3= <$list filter="[[34/56]] +[regexp[(-|/|\.)]]"></$list>

Result:
1= 12.34

2= 23-45

3= 34/56

This is the way I am checking to see which separator is returned. I am not 
satisfied with this cumbersome method, even though it works.
<$list filter="[[12.34]] [[23-45]] [[34/56]]">

<$list filter="[<currentTiddler>] +[regexp[(\.)]]"><<currentTiddler>> = 
.</$list>
<$list filter="[<currentTiddler>] +[regexp[(-)]]"><<currentTiddler>> = 
-</$list>
<$list filter="[<currentTiddler>] +[regexp[(/)]]"><<currentTiddler>> = 
/</$list>
</$list>

Result:
12.34 = .

23-45 = -

34/56 = / 

I want the result of my first $list to be the character that matched the 
regex.
I was wondering if there is a way to construct the regex so that the 
*regexp* operator shows exactly what matched, rather than just returning 
the input title?

Thanks

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2eabd3d5-3934-45a3-9405-efc149ab34a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to