Solved

Convert horizontal tab (	) into a space( )

Posted on 2004-08-12
6
557 Views
Last Modified: 2008-02-01
How would Achieve this? I thought I might use a replace statement but it's not playing nice with the 	.
0
Comment
Question by:longjt
  • 4
6 Comments
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11786770

/*
 * Created on Aug 12, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author Sudhakar
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Test1 {
      public static void main(String s[])
      {
            System.err.println("	".replaceAll("	"," ");
            
      }
}
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11786848
static String replaceWord(String original, String find, String replacement) {
          int i = original.indexOf(find);
          if (i < 0) {
              return original;  // return original if 'find' is not in it.
          }
        
          String partBefore = original.substring(0, i);
          String partAfter  = original.substring(i + find.length());
        
          return partBefore + replacement + partAfter;
      }
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11786905
>>I thought I might use a replace statement but it's not playing nice with the &#09;

Should work. What is the probem you ate facing??
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:longjt
ID: 11787819
Actually I gooffed. This is an asp question. Gata love programming in multiple languages.

the error is
                   Expected end of statement
this is on line:
                   strLine3 = Replace(strLine3), "&#09;", "&nbsp;"
0
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 75 total points
ID: 11790405
strLine3 = Replace(strLine3, "&#09;", "&nbsp;")
0
 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 11791423
or ???

strLine3 = Replace strLine3, "&#09;", "&nbsp;"
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
getting Http 404 error in jsp forms 8 81
How to find missing packages when using Netbeans IDE 8.1 ? 19 59
instanceof  operator in java 26 96
runtime exception 2 42
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
Read about why it is more lucrative for an IT company to participate in government projects.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question