MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spezifikationen Seite 355

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 504
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 354
Participant EDML files 355
The <empty> value is used if no pattern is given. It is always considered a match, and the
entire value is assigned to the first parameter.
In the following example, to identify the participant text
<%= RS1.Field.Items("author_id") %>, you can 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 example matches the pattern precisely and assigns the value of the first subexpression
(
\w+) to parameter "rs" and the second subexpression (\w+) to parameter "col".
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 optionLabel parameter to the entire innerHTML contents of an
OPTION tag.
<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.
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
/pattern/i).
For example, VBScript is not case-sensitive, so it should use
/pattern/i. JavaScript
is case-sensitive and should use
/pattern/.
Seitenansicht 354
1 2 ... 350 351 352 353 354 355 356 357 358 359 360 ... 503 504

Kommentare zu diesen Handbüchern

Keine Kommentare