Web Filtering

Regular expression pattern matching enables you to enter regular expressions into the Permit/Block lists to identify URLs. URL patterns that match these expressions are either permitted or blocked.

The simplest use of pattern matching is to implement keyword blocking, where any URL containing a keyword will be blocked regardless of its categorization.

A valid regular expression must be between 3 and 64 characters in length, and conform to the full regular expression syntax.

Examples of patterns are:

http://www.Acme.com — URL, to match the protocol.

www.Acme.com — keyword, to match the Acme site only.

www.Acme.com/* —a pattern to match any page on theAcme site.

Note You can use the wildcard (*) character anywhere in your entries into the URL Permit and Block Lists. The wildcard (*) character is allowed with or without the Regular Expression checkbox ticked. It is interpreted as zero or more characters. Wildcards are not implicitly added to the front and end of the string, thus allowing you to specify an absolute URL or a wildcard URL. Note that all matches are case insensitive.

Examples of regular expression patterns are shown in the table below:

Table 4–9: Regular Expression Syntax

Value

Description

 

 

 

 

x

Matches the character x

 

 

.

Match any character

 

 

^

Specifies beginning of line

 

 

$

Specifies end of line

 

 

[xyz]

A character class. In this case, the pattern matches either x,

 

y, or z

 

 

[abj-oZ]

A character class with a range. This pattern matches a, b,

 

any letter from j through o, or Z

 

 

[^A-Z]

A negated character class. For example, this pattern

 

matches any character except those in the class

 

 

r*

Zero or more r’s, where r is any regular expression

 

 

r+

One or more r’s, where r is any regular expression

 

 

r?

Zero or one r, where r is any regular expression

 

 

r{2,5}

From two to five r’s, where r is any regular expression

 

 

r{2,}

Two or more r’s, where r is any regular expression

 

 

r{4}

Exactly 4 r’s, where r is any regular expression

 

 

X Family LSM User’s Guide V 2.5.1

95