Search DaTutorials:  
HOME
VB Script Tutorials
Introduction
Reference
Tutorials

Replace a substring

Description:


How to replace a substring from a larger string.

Code:


<html>
<body>
<head>
<script type="text/vbscript">

function Repsubstring()

 var2 = Replace("What's@up?","@"," ")
 document.write("var2="& var2 & "< br>")

end function

</script>

</head>
<body>
<p>
<script type="text/vbscript">
Repsubstring()
</script>
</p>

</body>
</html>

See working example:


Keywords:

VBScript: function, replace

DHTML: document.write


     Secured Credit Cards | Loans | Bad Credit Loan | Hypnosis | PC's from IT247
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp