is there an equivalent for string concatination in vbscript that can substract a string

I have a string A :
I have a string B

I want to have the string 123 returned.

I want to do this in vbscript
Who is Participating?
Guy Hengel [angelIII / a3]Billing EngineerCommented:
something like
replace( A, B, "")
should do the work...
These links would be very useful to you:

"Parsing strings in ASP using VBscript functions"


InStr(StringToSearch, StringToFind)
The Function will return the position of the first occurence of StringToFind within StringToSearch. The Function will return 0 if StringToFind is not found.


The Left Function
Syntax: Left(String, NumofCharactersToGetFromString)

The Function will return the number of characters you stipulate. As is obvious it starts from the left.


response.write "The first 3 letters of my name are " & Left(String1,3)
The first 3 letters of my name are Mic


Replace VBScript function
The Replace function can be used to replace certain 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.


Response.write Replace(String1,"_"," ")
Result displayed on the screen would be:
My Name is Michael


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.