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

I have a string A :
123456
and
I have a string B
456

I want to have the string 123 returned.

I want to do this in vbscript
itbabeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
something like
replace( A, B, "")
should do the work...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nepostojeci_emailCommented:
These links would be very useful to you:

"Parsing strings in ASP using VBscript functions"
http://www.codefixer.com/tutorials/parsing_strings.asp

-----------------------------------------------------------------------

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.

Example:

<%
String1="Michael"
response.write "The first 3 letters of my name are " & Left(String1,3)
%>
Output:
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.

Example:

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

-----------------------------------------------------------------------

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.