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 Doubt on Regular Expression 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 "Doubt on Regular Expression" Watch "Doubt on Regular Expression" New topic
Author

Doubt on Regular Expression

Qunfeng Wang
Ranch Hand

Joined: Jan 28, 2005
Posts: 430

I've tried to use Greedy/Reluctant/Possessive quntifiers, but can't get the result I expected. Can someone help me out?

Thanks.


To be or not to be. It's a question.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Use ".*\\|" as the regular expression.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
wood burning stoves
 
subject: Doubt on Regular Expression