The
value is used if no pattern is given. It is always considered a match, and the
<empty>
entire value is assigned to the first parameter.
In the following example, to identify the participant text
<%= RS1.Field.Items("author_id") %>
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 example matches the pattern precisely and assigns the value of the first subexpression
(
) to parameter "
\w+
It is important that regular expressions start and end with a slash (/). Otherwise, the
expression is used as a literal string search. Regular expressions can be followed by
the regular-expression modifier "i" to indicate case-insensitivity (as in
For example, VBScript is not case-sensitive, so it should use
is case-sensitive and should use
Sometimes you might want to assign the entire contents of the limited search location to a
parameter. In that case, provide no pattern, as shown in the following example:
<searchPatterns whereToSearch="tag+OPTION">
<searchPattern>MY_OPTION_NAME</searchPattern>
<searchPattern paramNames="optionLabel" limitSearch="innerOnly">
</searchPattern>
</searchPatterns>
This example sets the
tag.
OPTION
<searchPattern> attributes
The following items are valid attributes of the searchPattern tag.
paramNames
Description
This attribute is a comma-separated list of parameter names whose values are being extracted.
These parameters are assigned in the order of the subexpression. You can assign single
parameters or use a comma-separated list to assign multiple parameters. If other parenthetical
expressions are used but do not indicate parameters, extra commas can be used as placeholders
in the Parameter Name list.
" and the second subexpression (
rs
/pattern/
parameter to the entire
optionLabel
, you can define a simple pattern, followed by
) to parameter "
\w+
.
innerHTML
Participant EDML files
".
col
/pattern/i
. JavaScript
/pattern/i
contents of an
355
).
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers