Java 9 Regular Expressions

Key FeaturesDiscover regular expressions and how they workImplement regular expressions with Java to your code baseLearn to use regular expressions in emails, URLs, paths, and IP addressesBook DescriptionThis easy-to-follow guide is a great place for you to familiarize yourself with the core concepts of regular expressions and to master its implementation with the features of Java 9. You will learn to match, extract, and transform text by matching specific words, characters, and patterns. You will begin by discovering what regular expressions are and how they work with Java. You will learn when and where to apply the methods for finding patterns in digits, letters, Unicode characters, and string literals. Going forward, you will learn to use zero-length assertions and lookarounds and to parse source code and process log files. Finally, you will be acquainted to some tips and tricks and best practices in Regex with Java.What you will learnUnderstand the semantics, rules and core concepts of writing Java code involving regular expressions.Learn about java.util.regex package using the Pattern class, Matcher class, code snippets etc.Match and capture text in regex and use back-reference to the captured groups.Explore regex using Java String methods and regex capabilities in Java Scanner API.Use zero width assertions and lookarounds in regex.Test and optimize a poorly performing regex and various other performance tips.About the AuthorAnubhava Srivastava has more than 22 years of professional experience in software development. He specializes mainly on J2EE technology stack and web development technologies. He is an active contributor on Stackoverflow community. He currently stands amongst the top 35 reputations out of 6.5 million stackoverflow users. He is passionate about regular expressions and is always willing to sharpen his regex skills further. He maintains a blog at and you can follow him on twitter @anubhava

Author: Anubhava Srivastava

Learn more