O'Reilly logo

Java 9 Regular Expressions by Anubhava Srivastava

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

Working with Groups, Capturing, and References

In this chapter, you will learn how to match, capture, and reference substrings from a given input text using regular expressions. We will cover various types of groups available in Java, and the naming and numbering of captured groups. Readers will also learn how to use back reference or forward reference of the capturing groups.

We will be covering the following topics in this chapter:

  • Grouping
  • Capturing groups
  • Group numbering
  • Non-capturing groups
  • Back references
  • Named groups
  • Forward references
  • Invalid references

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