Escape characters, Maximum string length – Adobe Extending Dreamweaver CS4 User Manual

Page 67

Advertising
background image

61

EXTENDING DREAMWEAVER CS4

Customizing Code view

Escape characters

The following is a list of escape characters that Dreamweaver supports, along with the strings to specify them and
descriptions of their usage.

Maximum string length

The maximum length allowed for a data string is 100 characters. For example, the following

blockEnd

tag contains a

wildcard character.

<blockEnd><![CDATA[<!--\s*#BeginEditable\s*"\*"\s*-->]]></blockEnd>

Assuming the optional white space wildcard strings (

\s*

) are a single space character, which Dreamweaver generates

automatically, then the data string is 26 characters long, plus a wildcard string (

\*

) for the name.

Wildcard with escape
character

\e*x

Where

x

is the escape character.

This is the same as the wildcard, except that an escape character can be
specified. The character following any escape character is ignored. This lets
the character following the wildcard appear in the string without matching
the criteria to end wildcard processing.

For example,

/\e*\\/

is used to recognize a JavaScript regular expression

that starts and ends with a forward slash (/) and can contain forward slashes
that are preceded by a backslash (\). Because the backslash is the code
coloring escape character, you must precede it with a backslash when you
specify it in code coloring XML.

Optional white space

\s*

This matches zero or more white space or newline characters.

For example,

<!--\s*#include

is used to match ASP include directives

whether they have any white space preceding the

#include

token or not

because either case is valid.

The white space wildcards match any combination of white space and
newline characters.

Required white space

\s+

This matches one or more white space or newline characters.

For example,

<!--#include\s+virtual

is used to match ASP include

directives with any combination of white space between

#include

and

virtual

. White space must be specified between these tokens, but it can

be any combination of valid white-space characters.

The white space wildcards match any combination of white space and
newline characters.

Escape character

Escape
string

Description

Backslash

\\

The backslash character (\) is the code coloring escape character, so it must
be escaped to be specified in a code coloring rule.

White space

\s

This escape character matches any non-visible characters, except those
listed that match the newline escape character, such as space and tab
characters.

The optional white space and required white space wildcards match both
the white space and newline characters.

Newline

\n

This escape character matches the newline (also known as linefeed) and
carriage-return characters.

Wildcard

Escape
string

Description

Advertising
This manual is related to the following products: