This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

java 6 replacell/repalcefirst

 
joe nesbitt
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all,

The following regex works when used in string.replaceall() but not in case of string.replaceFirst().

String:



Expected output:




Regex:



Output (not desired):






No changes are made to the string, not sure why.

Please help!

Thanks in advance.
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please UseOneThreadPerQuestion. This is your third thread about this question.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Report post to moderator
Wouter Oet wrote: . . . This is your third thread about this question.
In which case this thread si closed. Thank you fo noticing, Wouter.
 
    Bookmark Topic Watch Topic
  • New Topic