DREAMWEAVER CS3
User Guide
304
See also
“Make pages XHTML-compliant” on page 328
About regular expressions
Regular expressions are patterns that describe character combinations in text. Use them in your code searches to help
describe concepts such as lines that begin with ‘var’” and “attribute values that contain a number.”
The following table lists the special characters in regular expressions, their meanings, and usage examples. To search
for text containing one of the special characters in the table, escape the special character by preceding it with a
backslash. For example, to search for the actual asterisk in the phrase
some conditions apply*
, your search
pattern might look like this:
apply\*
. If you don’t escape the asterisk, you’ll find all the occurrences of “apply” (as well
as any of “appl”, “applyy”, and “applyyy”), not just the ones followed by an asterisk.
The following elements must have an
id
attribute as well as a
name
attribute:
a
,
applet
,
form
,
frame
,
iframe
,
img
, and
map
. For example,
<a name="intro">Introduction</
a>
is not valid; the correct form is
<a id="intro">Introduction</a>
or
<a id="section1"
name="intro"> Introduction</a>
.
Sets the
name
and
id
attributes to the same value,
whenever the
name
attribute is set by a Property
inspector, in the code that Dreamweaver generates, and
when cleaning up XHTML.
For attributes with values of an enumerated
type, the values must be lowercase.
An enumerated type value is a value from a
specified list of allowed values; for example, the
align
attribute has the following allowed
values:
center
,
justify
,
left
, and
right
.
Forces enumerated type values to be lowercase in the
code that it generates, and when cleaning up XHTML.
All script and style elements must have a
type
attribute.
(The
type
attribute of the
script
element
has been required since HTML 4, when the
language
attribute was deprecated.)
Sets the
type
and
language
attributes in
script
elements, and the
type
attribute in
style
elements,
in the code that it generates and when cleaning up
XHTML.
All
img
and
area
elements must have an
alt
attribute.
Sets these attributes in the code that it generates and,
when cleaning up XHTML, reports missing
alt
attributes.
Character
Matches
Example
^
Beginning of input or line.
^T
matches “T” in “This good earth” but not in “Uncle Tom’s
Cabin”
$
End of input or line.
h$
matches “h” in “teach” but not in “teacher”
*
The preceding character 0
or more times.
um*
matches “um” in “rum”, “umm” in “yummy”, and “u” in
“huge”
+
The preceding character 1
or more times.
um+
matches “um” in “rum” and “umm” in “yummy” but
nothing in “huge”
XHTML requirement
Actions Dreamweaver performs
September 4, 2007