Forum

Negative Matching in Toolkit

Geoff
12 April 2013, 12:45
Hi

Just upgraded to 4. You mention negative pattern matching in the Toolkit, but unless I'm missing something it hasn't made its way into the docs yet.

I would find this feature very useful - could you explain how it works?

By the way, I see you're considering adding PCRE - that would be awesome if you can find the energy

Thanks as always for all your hard work - I promote Hiawatha whenever I can!
Hugo Leisink
12 April 2013, 14:31
You mean version 9?

The negative pattern matching is mentioned in the manual page. How it works: place a exclamation mark in front of the pattern and the action will be performed if the pattern does not match. Example:
Match !^/hello DenyAccess

This will deny access to all requests that do not start with /hello

Abou the PCRE: I've looked at it but I'm not convinced that it's much better than POSIX. For URL rewriting POSIX looks good enough to me.
Geoff
13 April 2013, 17:41
Hugo - thanks for the info. It's a genuinely useful feature and a great addition.

Are you sure that this has made it into the manual? I searched for "negative" and for "pattern" and for "match". And now I know the syntax I've searched for "!" as well. I didn't spot anything. Perhaps I'm being dim, but I suggest you check.
This topic has been closed.