• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pattern matcher

 
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
Marshal
Pie
Posts: 22086
88
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic