Using the replace function you can easily replace a substring with another substring in a given string. For example if I wanted to remove all comma\'s from the following sentence, here\'s how I\'d do it.
<%
Dim myvar = "Welcome, my name is ryan."
myvar = Replace(myvar,",","")
%>
That\'s it.
|
Replace(mystring, substring_to_replace, string_to_replace[, start[, count[, compare]]])
Parameters The substring_to_replace parameter is the string to search for. The string_to_replace parameter is the string to replace the needle parameter with. The optional start parameter specifies the position to start the search. The optional count parameter specifies the number of substitutions to perform. The default is all possible substitutions. The optional compare parameter specifies the the method of comparison. The start parameter is required if compare is specified. |