File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Pattern Syntax Exception" Watch "Pattern Syntax Exception" New topic
Author

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.
 
wood burning stoves
 
subject: Pattern Syntax Exception