This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes a simple question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "a simple question" Watch "a simple question" New topic

a simple question

AJ Smith

Joined: Aug 13, 2003
Posts: 7
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

Joined: Jun 16, 2003
Posts: 82

SCJP 1.4
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24189

I think he means a TAB character, not the literal string "tab"; so he ought to use "\t" as the replacement string.

[Jess in Action][AskingGoodQuestions]
AJ Smith

Joined: Aug 13, 2003
Posts: 7
Thanx! Greg Neef , Ernest Friedman-Hill .
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: a simple question
It's not a secret anymore!