O'Reilly logo

Sams Teach Yourself Java™ 6 in 21 Days by Laura Lemay, Rogers Cadenhead

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

Appendix . Bonus Chapter: Regular Expressions

For most of Java’s existence, search-and-replace operations that could be accomplished in a single line of Perl code were an arduous undertaking in Java because it lacked support for regular expressions, a sophisticated form of text processing.

The Java class library includes robust support for regular expressions with the java.util.regex package and additional methods in several classes that handle characters.

In this bonus chapter, you’ll learn how to use these features as the following topics are covered:

  • How to create and use regular expressions

  • How to find a pattern in a line of text

  • How to split text into smaller strings delimited by regular expressions

Introduction to Pattern Matching

The most popular ...

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