Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to replace integer in agiven string

 
sunil kumar singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to replace height="100"and width="45" in the given string below
the height and width value are not fixed in the string given below


i am getting this string in a servlet as a string from request.getparameter method

<


 

 
subhash uppalapati
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the "string given below"?
 
Rajeev Trikha
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer would make use of regex.
 
Gabriela Cristian
Greenhorn
Posts: 18
Android
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
make use of string replace function( http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#replace%28char,%20char%29
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic