How to replace a string inside of a Word Document?

Java String Handling illusion?

  • hey Friends i am working on a project called find, replace TextField = Hello Saurav How Are You How Are You Doing Saurav Find What = Saurav Replace With = Gaurav all those 3 string must be get from user. or just tell me a string method tht replace a word from string to another string word

  • Answer:

    TextField tf = new TextField("Hello Saurav How Are You How Are You Doing Saurav"); parent.add( tf ); String s = tf.getText(); s = s.replaceAll("Saurav", "Gaurav"); tf.setText( s ); parent.repaint();

Sourav S at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You Should use Regular Expressions! if you mean Java Language Look At this tutorial: http://java.sun.com/docs/books/tutorial/essential/regex/ if you mean javascript: http://www.regular-expressions.info/javascriptexample.html

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.