This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Pattern Syntax Exception
 
It's not a secret anymore!