Skip to Main Content
Adobe® Dreamweaver® CS4 Bible
book

Adobe® Dreamweaver® CS4 Bible

by Joseph Lowery
March 2009
Beginner to intermediate content levelBeginner to intermediate
1321 pages
46h 24m
English
Wiley
Content preview from Adobe® Dreamweaver® CS4 Bible
326
Part II
Designing and Crafting Basic Pages
Matching character ranges
Beyond single characters, or repetitions of single characters, regular expressions incorporate the
capability of finding or excluding ranges of characters. This feature is particularly useful when
you’re working with groups of names or titles. Ranges are specified in set brackets. A match is made
when any one of the characters within the set brackets, not necessarily all the characters, is found.
Descriptions of how to match character ranges with regular expressions are shown in Table 8-5.
TABLE 8-5
Regular Expression Character Ranges
Character Matches Example
[abc] Any one of the characters a, b, or c [lmrt] matches the individual l and m’s in
lemmings, and the r and t in roadtrip.
[^abc] Any character except a, b, or c
[^etc] matches each character in GIFs, but not etc
in the phrase GIFs etc.
[a-z] Any character in the range from a to z
[l-p] matches l and o in lowery, and m, n, o, and
p in pointman.
x|y Either x or y
boy|girl matches both boy and girl.
Using grouping with regular expressions
All the regular expressions described previously relate to finding a certain string of text within your
documents. But after you’ve located a particular string using regular expressions, how can you use
that particular string in the Replace With field? For example, the following list of names:
John Jacob Jingleheimer Schmidt
Jame ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Adobe® Dreamweaver® CS5 Bible

Adobe® Dreamweaver® CS5 Bible

Joseph W. Lowery
Dreamweaver® CS3 Bible

Dreamweaver® CS3 Bible

Joseph W. Lowery

Publisher Resources

ISBN: 9780470382523Purchase book