Name

java.util.regex.PatternSyntaxException

Description

Thrown to indicate a syntax error in a regular expression pattern.

Methods

PatternSyntaxException(Stringdesc, Stringregex, intindex)

Construct an instance of this class.

String getDescription( )

Return error description.

int getIndex( )

Return error index.

String getMessage( )

Return a multiline error message containing error description, index, regular expression pattern, and indication of the position of the error within the pattern.

String getPattern( )

Return the regular expression pattern that threw the exception.

Get Regular Expression Pocket Reference, 2nd Edition 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.