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 matcher 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 matcher" Watch "pattern matcher" New topic
Author

pattern matcher

Shashank Sharma
Ranch Hand

Joined: Sep 27, 2006
Posts: 91

if I remove the comments then the the while lop does not print any thing..,,..
but the replaceAll method is not changing the original string but returning a new modified string.
please help..
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 19073
    
  40


The replaceAll() method uses the find() method, and hence, already found everything. If you want to find again, then reset the matcher.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
Don't get me started about those stupid light bulbs.
 
subject: pattern matcher