Sun Java System Web Proxy Server 4.0.3 2006Q2 Administration Guide

shExpMatch(str, shexp)

The shExpMatch() function matches either the URL host names or the URLs themselves. The main use of this function is for load balancing and intelligent routing of URLs to different proxy servers.

Parameters:

str is any string to compare (for example, the URL or the host name).

shexp is a shell expression against which to compare.

This expression is true if the string matches the specified shell expression. See Example 6: Balance Proxy Load with shExpMatch().

Returns:

true or false

Examples:

The first example returns true; the second returns false.

shExpMatch("http://home.example.com/people/index.html",
            ".*/people/.*")
shExpMatch("http://home.example.com/people/yourpage/index.html",
            ".*/mypage/.*")