Regular Expression Programming Using Java String and Scanner APIs

In this chapter, you will be introduced to Java regular expressions using Java String methods and we will move on to regular expression capabilities in Java Scanner API.

We will cover the following topics in this chapter:

  • Java String methods that use regular expressions
  • What these methods are used for and how to use them
  • The use of regular expressions in Java Scanner

So far, we have covered many theoretical concepts of writing regular expressions in depth. The time has now come to see some of these regular expressions in action. We are going to introduce you to Java programs evaluating these regular expressions using the java.lang.String and java.util.Scanner APIs.

Get Java 9 Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.