Mohammad wrote:
>
> Does this pattern allows trailing slashes?
>

No. To do that you could use ...

*^(([^/]*?)/){1,}[^/]*?$*
This makes the negation classes "[^/]*?" matching "not /" of 0 or more 
length (rather than 1 or more)
This will match tiddlers ending "/", as well as cases where the title could 
just be "///"

By the way, if you want to see all titles with "/" use {1,} = 1 or more

---

But to match that use case only, where you only wanted to list tiddlers 
with a trailing "/"  use this simple pattern :-) ...

*/$*

Part of the art with regex is determining when to be minimal and when to go 
for something with wider matching power but more complexity.
The more complex it gets the more important it gets to test against data to 
be sure it works as expected.

TT
 

>
>
> *Advanced use of the Negated Character Class*
>>
>> *Match titles with defined numbers of "/" slash*
>> *^(([^/]+?)/){1}[^/]+?$*
>>
>> The  difference here is in *{1}*
>>
>> If you change the number then it will change the number of "/" permitted 
>> in the match.
>>
>> You can test it at: 
>> http://tw-regexp.tiddlyspot.com/#RegExp%20Experimentation%20with%20Title 
>>
>

-- 
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/5dff1cfa-c637-4321-a4b0-0e0724659901%40googlegroups.com.

Reply via email to