• Post Reply Bookmark Topic Watch Topic
  • New Topic

pattern matcher  RSS feed

 
Shashank Sharma
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 23291
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Henry
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!