Operation Manual
280
USING DREAMWEAVER
Working with page code
Last updated 3/28/2012
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.
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.
Setting up your coding environment
Using coder-oriented workspaces
You can adapt the coding environment in Dreamweaver to fit the way you work. For example, you can change the way
you view code, set up different keyboard shortcuts, or import and use your favorite tag library.
Dreamweaver comes with several workspace layouts designed for an optimal coding experience. From the workspace
switcher on the Application bar, you can select from Application Developer, Application Developer Plus, Coder, and
Coder Plus workspaces. All of these workspaces show Code view by default (in either the entire Document window,
or in Code and Design views), and have panels docked on the left side of the screen. All but Application Developer
Plus eliminate the Property inspector from the default view.
If none of the pre-designed workspaces offer exactly what you need, you can customize your own workspace layout by
opening and docking panels where you want them, and then saving the workspace as a custom workspace.
\w Any alphanumeric character, 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%”
Control+Enter or
Shift+Enter (Windows), or
Control+ Return or
Shift+Return or
Command+ Return
(Macintosh)
Return character. Make sure that you deselect
the Ignore Whitespace Differences 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 characters appear as spaces in
Design view, not as line breaks.
Character Matches Example