/home/web-programming/asp/

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

%>


Result

How is Tammy?