90
Chapter 7 Using Web Development Languages
3
If you do not want the dialog box to display again and you will always use the
same
DOCTYPE
declaration, then select Always replace with this DTD.
4
If you do not want to display this dialog box, and you never want to replace or
insert a
DOCTYPE
declaration, then select Don’t ask me again.
5
Click OK.
6
If you need to undo this, select
Options > Set Document as XHTML
again with
the XHTML document as the current document in the editor. In the Confirm
dialog box, click Yes.
Using Regular Expressions
This section describes regular expressions and provides information and examples
for using them in ColdFusion Studio. The rules listed in this section are for creating
regular expressions in ColdFusion Studio; the rules used by other RegExp parsers
might differ.
An excellent reference on regular expressions is Mastering Regular Expressions by
Jeffrey E.F. Friedl, published by O'Reilly & Associates, Inc.
About regular expressions
A regular expression is a pattern that defines a set of character strings. The
RegExp
parser in ColdFusion Studio evaluates the indicated text and returns each matching
pattern.
Like in arithmetic expressions, you can use various operators to combine smaller
expressions; simple regular expressions can be concatenated into complex criteria.
For more information, see
“Anchoring a regular expression to a string” on page 93
.
In ColdFusion Studio, you can use regular expressions for extended searches and
validating code. Following is a description of each usage:
•
Extended search
Search a document for a pattern rather than a specific string
of characters. For example, search for repeated words with
(" [A-Za-z] "){2,}
.
In an extended search, all matches are added to the list of results. But in an
extended search and replace, matches are immediately replaced with the
replacement text. So consider not only what is matched but what is not matched;
for example, there might be two or more strings that you must replace with the
same text. Also, it is always a good idea to back up your files first!
In a search and replace operation, the RegExp engine processes the entire
document; it does not parse on a line-by-line basis. This affects the way that you
should use characters such the asterisk (*), carat (^) and dollar sign ($).
•
Code validation
Define a special requirement for your code in the validator.
For example, set the validator to search for (and flag as an error) any user input
box that does not have an associated error message.
For more information, also see
“Using extended search commands” on page 154
and
“Validating Code” on page 102
.
Содержание ColdFusion Server 5
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...