Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a simple question

 
AJ Smith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to replace all the string "abc" with a "tab" in string "abcDDDDabcDDDabcDDDDDDDabcD" ?
any suggestion or segment of code is helpful. thanx!
 
Greg Neef
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think he means a TAB character, not the literal string "tab"; so he ought to use "\t" as the replacement string.
 
AJ Smith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx! Greg Neef , Ernest Friedman-Hill .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic