Specifications
Chapter 14184
In this case, the following quickSearch string checks for it:
<quickSearch>Response.Redirect</quickSearch>
For performance reasons, the quickSearch pattern is the beginning of the process of finding 
server behavior instances. If this string is found in the document and the participant identifies a 
server behavior (in the group file, 
partType="identifier" for this participant), the related 
server behavior files are loaded and 
findServerBehaviors() is called. If your participant has no 
reliable strings for which to search (or for debugging purposes), you can leave the 
quickSearch 
string empty, as shown in the following example:
<quickSearch></quickSearch>
In this case, the server behavior is always loaded and can search the document.
Next, the searchPattern tag searches the document more precisely and extracts parameter 
values from the participant code. The search patterns specify where to search (the 
whereToSearch attribute) with a series of searchPattern tags that contain specific patterns. 
These patterns can use simple strings or regular expressions. The previous example code is an ASP 
directive, so 
whereToSearch="directive", and a regular expression identifies the directive and 
extracts the parameters, as shown in the following example:
<quickSearch>Response.Write</quickSearch>
<searchPatterns whereToSearch="directive">
<searchPattern paramNames="rs,new__url">
/if\s*\((\w+)\.EOF\)\s*Response\.Redirect\("([^\r\n]*)"\)/i
</searchPattern>
</searchPatterns>
The search string is defined as a regular expression by starting and ending with a slash (/), and is 
followed by 
i so that it is not case-sensitive. Within the regular expression, special characters such 
as parentheses () and periods (.) are escaped by preceding them with a backslash (\). The two 
parameters 
rs and new__url are extracted from the string by using parenthetical subexpressions. 
(The parameters must be enclosed in parentheses.) In this example, they are indicated by 
(\w+) 
and 
([^\r\n]*): These values correspond to the regular expression values that are normally 
returned by 
$1 and $2.
Optional search patterns There might be cases where you want to identify a participant even if 
some parameters are not found. You might have a participant that stores some optional information 
such as a telephone number. For such an example, you could use the following ASP code:
<% //address block
LNAME = "joe";
FNAME = "smith";
PHONE = "123-4567";
%>
You could use the following search patterns:
<quickSearch>address</quickSearch>
<searchPatterns whereToSearch="directive">
<searchPattern paramNames="lname">/LNAME\s*=\s*"([^\r\n]*)"/i¬
</searchPattern>
<searchPattern paramNames="fname">/FNAME\s*=\s*"([^\r\n]*)"/i¬
</searchPattern>
<searchPattern paramNames="phone">/PHONE\s*=\s*"([^\r\n]*)"/i¬
</searchPattern>
</searchPatterns>










