beautypg.com

Server behavior code – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 457

background image

To the top

\B

Anything other than a word boundary.

\Bb matches “b” in “goober” but nothing in
“book”

\d

Any digit character. Equivalent to [0-9].

\d matches “3” in “C3PO” and “2” in
“apartment 2G”

\D

Any nondigit character. Equivalent to [^0-
9].

\D matches “S” in “900S” and “Q” in “Q45”

\f

Form feed.

\n

Line feed.

\r

Carriage return.

\s

Any single white-space character,
including space, tab, form feed, or line
feed.

\sbook matches ”book” in “blue book” but
nothing in “notebook”

\S

Any single non-white-space character.

\Sbook matches “book” in “notebook” but
nothing in “blue book”

\t

A tab.

\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
tag or a

tag. Return characters appear as
spaces in Design view, not as line breaks.

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.

More Help topics

Legal Notices

|

Online Privacy Policy

450

This manual is related to the following products: