Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Removing characters Right of a string character.

Posted on 2008-11-06
Medium Priority
Last Modified: 2009-06-16
Hello, Im using classic ASP and I need to be able to remove characters Right of a string character.

String text: NJ5496727738B5/5

I need to remove the / and any characters after that from the string before I can quary the Database. Also, take that number after / and throw that into a new string.
Question by:inrworx
  • 2
LVL 82

Expert Comment

ID: 22899157
Dim data
data ="NJ5496727738B5/5";


Response.Write( data[0] ) 'contains the string to the left of the slash
Response.Write( data[1] ) 'contains the string to the right of the slash

Accepted Solution

mmaxwell43534 earned 500 total points
ID: 22966116
Hielo is right, except ASP Classic arrays use () and not [].

It would be data(0).

If you use a [], you'll get one of these:

Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
LVL 82

Expert Comment

ID: 23468809
>>except ASP Classic arrays use () and not [].
LOL. Yes of course. I typically code my asp pages in javascript. Hence my "bad habit" :)

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question