ASP Replace Function

e ASP Replace() function is used to replace sub-strings found within a string.

Replace Function Arguments

String to be searched
Sub-string to be searched for
String that will replace the sub-string

ASP Coding for Replace Function


sTxtString = "How is John?"
sTxtString = Replace(sTxtString,"John","Tammy")

Response.Write sTxtString



How is Tammy?