This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • 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: 21498
84
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