O'Reilly logo

The Java™ Tutorial Fourth Edition: A Short Course on the Basics by Mark Hoeber, Tom Risser, Isaac Rabinovitch, Jacob Royal, Scott Hommel, Sharon Zakhour

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 13. Regular Expressions

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

Introduction

What Are Regular Expressions?

Regular expressions are a way to describe a set of strings based on common characteristics shared by each string in the set. They can be used to search, edit, or manipulate text and data. You must learn a specific syntax to create regular expressions—one that goes beyond the normal syntax of the Java programming language. Regular expressions vary ...

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