Wildcards Pattern Matches

The default pattern match is ECMAScript, which is a Perl-compatible syntax for regex. Most examples in this chapter are based on Regular Expressions rather than Wildcards because of the high level of flexibility. However, two other pattern syntaxes, Wildcards and Exact Match, are also good options.

Exact Match is straightforward and doesn't need any further explanation. It means just what its name implies.

Wildcards, on the other hand, do require further mention. There are two reasons why you might consider Wildcards pattern matches. First, they are easy to learn and figure out. Second, they perform faster than Regular Expressions. So, for very high-performance situations you can use the Wildcards pattern match rather than Regular Expressions to get a bit of extra performance out of the server. See the Note in the next section for further information about performance.

There is just one special character to keep track of for Wildcards pattern matches. The * (asterisk) character is a wildcard match of zero or more characters of any type. It is also used for back-references, as discussed later in this chapter.

Warning
Although the ? is documented in the URL Rewrite documentation, it is not a supported special character. The documentation about the ? character is incorrect. See the following forum thread in which one of the IIS product team members provides the story on the ? character: http://forums.iis.net/t/1167455.aspx.

The other difference between ...

Get Professional Microsoft IIS 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.