aspose 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

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

Joined: Sep 28, 2004
Posts: 19522

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: pattern matcher