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

Constructs of the standard regular expression and meta characters

Let's get familiar with core constructs of regular expressions and some reserve meta characters that have a special meaning in regular expressions. We shall cover these constructs in detail in the coming chapters:

Symbol Meaning Example
. (dot or period) Matches any character other than newline. Matches #, @, A, f, 5, or .
* (asterisk) * matches zero or more occurrences of the preceding character or group. m* matches 0 or more occurrences of the letter m.
+ (plus) + matches one or more occurrences of the preceding element. m+ matches one or more occurrences of the letter m.
? (question mark) ? means optional match. It is used to match zero or one occurrence of the ...

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