jQuery in Action, 2nd edition*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Pattern Syntax Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Pattern Syntax Exception" Watch "Pattern Syntax Exception" New topic

Pattern Syntax Exception

Abhi vijay
Ranch Hand

Joined: Sep 16, 2008
Posts: 509

In this example when will a Pattern Syntax Exception thrown?
Ruben Soto
Ranch Hand

Joined: Dec 16, 2008
Posts: 1032
Hi Abhi,

Your example won't throw a PatternSyntaxException. That's thrown by compile, when you give bad syntax for the regex. For example, try deleting the period (.) and run your program again.

All code in my posts, unless a source is explicitly mentioned, is my own.
Abhi vijay
Ranch Hand

Joined: Sep 16, 2008
Posts: 509
Thanks. Ruben.
I agree. Here's the link: http://aspose.com/file-tools
subject: Pattern Syntax Exception
Similar Threads
exception handling
Error on "Execute","respose" and on "comma" on Action file.
Finally block
error in following code
Compiler error Vs Runtime Exception