Replace VBScript function

The Replace function can be used in ASP to replace characters within a string with other characters.

Syntax:Replace(StringToSearch, StringToFind, ReplaceWithThisString)

StringtoSearch is the string you want to check for any occurence of the StringToFind. If there are any occurences of StringToFind then the function will replace them with ReplaceWithThisString. Every occurence will be replaced starting from the first character of StringToSearch.

Example:

<%
String1="My_Name_is_Michael"
Response.write Replace(String1,"_"," ")
%>

Result displayed on the screen would be:
My Name is Michael



Other useful VBScript functions for Parsing String

LinksPro - Directory  and Link  Management Software

Get the best asp web hosting provider now and save 30%

Advertisements



MembersPro

MembersPro PayPal - ASP Membership software

Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.