Convert horizontal tab (	) into a space( )

How would Achieve this? I thought I might use a replace statement but it's not playing nice with the 	.
longjtAsked:
Who is Participating?
 
sudhakar_koundinyaConnect With a Mentor Commented:
strLine3 = Replace(strLine3, "	", " ")
0
 
sudhakar_koundinyaCommented:

/*
 * 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
 
sudhakar_koundinyaCommented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
sudhakar_koundinyaCommented:
>>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
 
longjtAuthor Commented:
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
 
sompol_kiatkamolchaiCommented:
or ???

strLine3 = Replace strLine3, "&#09;", "&nbsp;"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.