RegExp Condition

RegExp condition is used to define page(s) to assign template to with the help of regular expressions.

In the Condition field , you should specify the regular expression that should be used to identify required pages. Note that you should not use domain name in your regular expressions. For example, to assign a template to multiple pages using regular expression, you can use the following code:

/^/Articles[0-9]{0,5}(?:/(?:default.aspx)?)?$/i

The sample page URLs given below match this condition, so template will be assigned to them:

http://www.mysite.com/Articles/

http://www.mysite.com/Articles/default.aspx

http://www.mysite.com/Articles125/default.aspx

http://www.mysite.com/Articles00000

Viewing regular expressions

You can view graphical representation of your regular expression by clicking the Visualize Regexp button in Template Manager:

Visualize Regexp