Team LiB
Previous Section Next Section

Introduction

The fundamental goal of any computer language is the manipulation of data. Traditionally, Java has been an excellent language for doing so, provided that the data is represented as objects. However, Java's raw data manipulation mechanisms have always been somewhat lacking, especially when compared to the powerful machinations offered by languages such as Perl and awk.

The introduction of a standard regular expression package into Java 2 Standard Edition (J2SE) is an excellent step in rectifying this oversight. The java.util.regex package offers developers everything they need to use regular expressions in Java, all packaged in an easy-to-use, object-oriented structure. I think that you'll find that the java.util.regex package can become an extremely powerful tool in your programming arsenal, as well an elegant instrument that you'll enjoy using. After you've mastered it, you will wonder, as I did, how you ever managed without it.

What this Book is About

This book is a comprehensive introduction to the regular expression support built into J2SE, and it's designed to help Java programmers who have little to no experience with regular expressions. It's meant to be both a reference and an explanatory text. Although a background in regular expressions is helpful, I don't make any such assumptions when presenting the material. The central aim is to help everyday programmers solve everyday problems.

After reading this text, you should be able to solve a great many of your routine text validation, searching, modification, and replacement problems quickly and efficiently by using Java's built-in regular expression support. Of course, this book also covers some advanced features of regular expressions. You should to be able to effectively use your new understanding of regular expressions as soon as you finish Chapter 1.


Team LiB
Previous Section Next Section