Specifications

Chapter 14170
comment searches only within the HTML comments <! ... >, as shown in the
following example:
<searchPatterns whereToSearch="comment">
This example indicates that tags such as <!-- my comment here --> are searched.
text searches only within raw text sections, as shown in the following example:
<searchPatterns whereToSearch="text">
<searchPattern>XYZ</searchPattern>
</searchPatterns>
This example finds a text node that contains the text XYZ.
EDML Tag: searchPattern
Description
A pattern that is used to identify participant text and extract parameter values from it. Each
parameter subexpression must be wrapped in parentheses ().
You can have patterns with no parameters (which is used to identify participant text), patterns
with one parameter, or patterns with many parameters. All non-optional patterns must be found,
and each parameter must be named and found exactly once.
For more information about using
searchPattern, see Finding server behaviors on page 183.
Parent
searchPatterns
Type
Block tag.
Required
Yes.
Values
searchString, /regularExpression/, <empty>
searchString is a simple search string that is case-sensitive. It cannot be used to
extract parameters.
/regularExpression/ is a regular expression search pattern.
<empty> is if no pattern is given. It is always considered a match, and the entire value is
assigned to the first parameter.
For example, to identify the participant text
<%= RS1.Field.Items("author_id") %>,
you could define a simple pattern, followed by a precise pattern that also extracts the two
parameter values:
<searchPattern>Field.Items</searchPattern>
<searchPattern paramNames="rs,col">
<![CDATA[
/<%=\s*(\w+)\.Field\.Items\("(\w+)"\)/
]]>
</searchPattern>
This matches the pattern precisely and assigns the value of the first subexpression (\w+) to
parameter "
rs" and the second subexpression (\w+) to parameter "col".