File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

java 6 replacell/repalcefirst

 
joe nesbitt
Greenhorn
Posts: 17
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please UseOneThreadPerQuestion. This is your third thread about this question.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47244
52
  • 0
  • 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