jQuery in Action, 3rd edition
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: 20029
    
  44


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)
 
Have you checked out Aspose?
 
subject: pattern matcher
 
jQuery in Action, 3rd edition