DREAMWEAVER CS3
User Guide
306
Use parentheses to set off groupings within the regular expression to be referred to later. Then use $1, $2, $3, and so
on in the Replace With field to refer to the first, second, third, and later parenthetical groupings.
Note:
In the Search For box, to refer to a parenthetical grouping earlier in the regular expression, use \1, \2, \3, and so
on instead of $1, $2, $3.
For example, searching for (\d+)\/(\d+)\/(\d+) and replacing it with $2/$1/$3 swaps the day and month in a date
separated by slashes, thereby converting between American-style dates and European-style dates.
See also
“Search for tags, attributes, or text in code” on page 320
“Save and recall search patterns” on page 321
About server behavior code
When you develop a dynamic page and select a server behavior from the Server Behaviors panel, Dreamweaver
inserts one or more code blocks into your page to make the server behavior work.
If you manually change the code within a code block, you can no longer use panels such as the Bindings and Server
Behaviors panels to edit the server behavior. Dreamweaver looks for specific patterns in the page code to detect
server behaviors and display them in the Server Behaviors panel. If you change a code block’s code in any way,
Dreamweaver can no longer detect the server behavior and display it in the Server Behaviors panel. However, the
server behavior still exists on the page, and you can edit it in the coding environment in Dreamweaver.
See also
“Automatic code modification in Dreamweaver” on page 302
“Optimizing the workspace for visual development” on page 538
“Displaying database records” on page 570
\w
Any alphanumeric char-
acter, including underscore.
Equivalent to [A-Za-z0-9_].
b\w* matches “barking” in “the barking dog” and both “big”
and “black” in “the big black dog”
\W
Any non-alphanumeric
character. Equivalent to
[^A-Za-z0-9_].
\W matches “&” in “Jake&Mattie” and “%” in “100%”
Enter
or Shift+Enter
(Windows), or
Return or
Shift+Return
or
Return
(Macintosh)
Return character. Make sure
that you deselect the
Ignore Whitespace Differ-
ences option when
searching for this, if not
using regular expressions.
Note that this matches a
particular character, not the
general notion of a line
break; for instance, it
doesn’t match a
<br>
tag
or a
<p>
tag. Return char-
acters appear as spaces in
Design view, not as line
breaks.
Character
Matches
Example
September 4, 2007