• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

how to replace integer in agiven string  RSS feed

 
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

<


 

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the "string given below"?
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer would make use of regex.
 
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
Boost this thread!