It's not a secret anymore!*
The moose likes Java in General and the fly likes how to replace integer in agiven string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to replace integer in agiven string" Watch "how to replace integer in agiven string" New topic
Author

how to replace integer in agiven string

sunil kumar singh
Greenhorn

Joined: Oct 16, 2008
Posts: 1
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

Joined: Nov 03, 2005
Posts: 17
Where is the "string given below"?
Rajeev Trikha
Ranch Hand

Joined: Jan 29, 2010
Posts: 85
Answer would make use of regex.


Rajeev Trikha (SCJP 6)
Gabriela Cristian
Greenhorn

Joined: Dec 02, 2008
Posts: 18

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to replace integer in agiven string
 
Similar Threads
jasper reports with subreports
how to create a tag to draw rectangle
Conflicting slideshows on same page
Access Data from Database By Submitting The select Values
Preferences.exportSubTree() does not export all xml nodes