Patterns and pattern classes are stored in a Java properties file. You can use any standard ASCII text editor to add, modify, or delete patterns and pattern classes. As Java properties, patterns are subject to certain rules. For example, a backslash (\), must be escaped by another backslash (\\), or it is interpreted as a special character. You can escape other types of characters, such as single quotes, spaces, double quotes, and parenthesis.
The following example patterns are useful for many common Web sites. Backslashes are escaped as two backslashes.
Pattern.Standard.101=(.*?window\\.open\\s*\\(\\s*)(.*?)(,.*)
Pattern.Standard.102=(.*location\\.href\\s*\\=\\s*)(.*?)(;.*)
Pattern.Standard.103=(.*\\.location\\s*\\=\\s*)(.*)(;.*)
Pattern.Standard.104=(.*\\.action\\s*\\=\\s*)(.*)(;.*)
The patterns above conform to the Pattern.pc.index
format,
where the pattern class (pc) is “Standard” and
the index ranges from 101 to 104.
Each pattern has three sets of data, defined by parenthesis.
If there is a match in a client-side JavaScript with any of these
patterns, the SWP replaces the pattern
with the value defined in Pattern.pc.index.Substitution
.