O'Reilly logo

The Java® Tutorial: A Short Course on the Basics, 6th Edition by Sharon Biocca Zakhour, Joni Gordon, Sowmya Kannan, Scott Hommel, Raymond Gallardo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Regular Expressions

This chapter explains how to use the java.util.regex1 API for pattern matching with regular expressions. Although the syntax accepted by this package is similar to the Perl2 programming language, knowledge of Perl is not a prerequisite. This chapter starts with the basics, and gradually builds to cover more advanced techniques.

The introductory section provides a general overview of regular expressions. It also introduces the core classes that comprise this API.

The other sections do the following:

• Define a simple application for testing pattern matching with regular expressions.

• Introduce basic pattern matching, metacharacters, and quoting.

• Describe simple character classes, negation, ranges, unions, intersections, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required