Searchpattern - MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

<searchPattern>
Description
This tag is a pattern that identifies participant text and extracts parameter values from it. Each
parameter subexpression must be enclosed in parentheses ().
You can have patterns with no parameters (which are 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 the
on page
286.
Parent
searchPatterns
Type
Block tag.
Required
Yes.
Values
,
searchString
The
searchString
extract parameters.
The
/regularExpression/
The
<empty>
value is assigned to the first parameter.
In the following example, to identify the participant text
<%= RS1.Field.Items("author_id") %>
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+
Note: 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
not case-sensitive, so it should use
.
pattern/
274
Chapter 15: Server Behaviors
/regularExpression/
value is a simple search string that is case-sensitive. It cannot be used to
value is a regular expression search pattern.
value is used if no pattern is given. It is always considered a match, and the entire
" and the second subexpression (
rs
/pattern/i
tag, see

searchPattern

,
<empty>
, you can define a simple pattern, followed by a
\w+
/pattern/i
. JavaScript is case-sensitive and should use
"Finding server behaviors"
) to parameter "
".
col
). For example, VBScript is
/

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents