| | |
How to replace repeated substring in other string?
![]() |
•
•
Join Date: May 2005
Posts: 55
Reputation:
Solved Threads: 1
You can use the String classes replaceAll method. Here is an example:
For more help, www.NeedProgrammingHelp.com
Java Syntax (Toggle Plain Text)
String str = "Hello blank"; String newStr = str.replaceAll("blank", "Jim") ; System.out.println(newStr); //prints "Hello Jim"
![]() |
Similar Threads
- Question about string pattern matching (Java)
- error creating substring (VB.NET)
- Update to completly lost : ) (Java)
- finding repeated subsequence in string (Java)
Other Threads in the Java Forum
- Previous Thread: Two basic java questions
- Next Thread: JPanel and putting a Background GIF pic...NOT WORKING
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






