Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace a substring in a string

Status
Not open for further replies.

MagiMike

Technical User
Jun 5, 2003
44
0
0
SE
This question seems to have been answered before but for ASP/VB.
I'm using ASP/mod_perl. Is there any equivalent command for mod_perl? Replace does not work for me...
 
BTW...here is the explanation...

Replaces the part of the string beginning at OFFSET of the length LEN with the REPLACEMENT string.

-DNG
 
Sorry, wasn't clear enough in my question. What I was looking for is the function that replaces every occurence of a string in a large string with another string. In other words, just like Replace in ASP/VB, but I can only use ASP/mod_perl.

Example
I have this string: "Hello Mr.X, how are you doing Mr.X?"
and then I want to replace Mr.X with another name, Mike, so that I get: "Hello Mike, how are you doing Mike?"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top