You can enter a regular expression in Client Rules and Agent Rules. A regular expression is an object that describes a pattern of characters. Regular expressions perform pattern-matching and search-and-replace functions on text.

URL Content Redirection supports the following regular expression rules.

Rule Detail
Brackets [ ], [^ ], ( ), (?:), (?=)
\+metacharacter or metacharacter '\w', '\W', '\d', '\D', '\b', '.'
Quantifiers +, *, ?, {x}, {x,y}, {x,}
Alternation |

For detailed information about regular expressions, see https://en.wikipedia.org/wiki/Regular_expression.

The following table contains examples of regular expression rules that URL Content Redirection supports.

Rule Entry Examples of Matching URLs and IP Addresses
.*\.net www.hello.net, www.inter.net, train.word.net, test.train.net, and train.chromeie.net.com.cn.
.*\.sth\.ctirial example.sth.ctirial, www.google.sth.ctirial, and www.google.com/test.sth.ctirial/editpage.action.
.*administra www.administra.com, www.askadministra-tor.net, and google.akmkda.eae/administra.cn.
.*a{4}custom\.com world.banada.cn/aaaacustom.com, www.aaaacustom.com, and exple.aaaacustom.com.net/nodepad.action.
.*a{2,3}custom\.com world.banada.aacustom.com, www.aaacustom.com, and exple.aacustom.com.net/nodepad.action.
.*train[abc]\.net hello.traina.net, hello.trainb.net, example.trainc.net.com, and www.testtraina.net.com/edit.
.*train[^abc]\.net hello.traind.net, hello.traine.net, example.train2.net.com, and www.testtrain3.net.com/edit.
.*a+c*tra\.net www.actra.net.com. aactra.net.cn, atra.net.www.train, and aaccctra.netword.
.*example(test)?\.cn www.example.cn, www.exampletest.cn, example.cn/editpage, and exampletest.cn/editpage.
sac(?=sprt) helloworld.sacsprt.net, examplesacsprt.com/text, and www.sacsprtexam.com.
sac(?!sprt) helloworld.sacspra.net, examplesacbprt.com/text, and www.sacexam.com.
10\.1\.1\.1[0-5] 10.1.1.10 through 10.1.1.15.
10\.1\.(1|2)\.1[0-5] 10.1.1.10 through 10.1.1.15 and 10.1.2.10 to 10.1.2.15.
10\.[2-4]\.19\.12 10.2.19.12, 10.3.19.12, and 10.4.19.12.
10\.[^2-4]\.19\.12 10.6.19.12, 10.1.19.12,10.5.19.12, and 10.7.19.12.
a(\w)cd(\d)345a\.com www.abccd2345a.com.net and train.adc2cd1345a.com/edit.action.
abc(\W)cd(\D)345a\.com google.abc+cda345a.com and test.train.net/abc&cda345a.com.
((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]) All IPv4 addresses.
.*example(test)?\.cn;10\.1\.1\.1[0-5];a(\w)cd(\d)345a\.com www.example.cn, example.cn/editpage,10.1.1.10 to 10.1.1.15, www.abccd2345a.com.net, and train.adc2cd1345a.com/edit.action.