Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2005, 12:43 AM
Authorized User
 
Join Date: Sep 2003
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zaeem Send a message via Yahoo to zaeem
Default Searching Within String

Hello this is Zaeem, I want to split a string, the string is like "EE123" which is basically course code of electronics in some intitute. the first two letter must be alphabet and remaining will be the digits.
I want to get splitted string digits and characters.
Anyone please help me.

thanx everybody

Zaeem Sherazi
__________________
Zaeem Sherazi
 
Old May 9th, 2005, 01:28 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

This is cut n paste:
-----------------start-------------------------------
   dim str,Alpha,Numeric
   str = "EE123"
   response.write "My Whole String = " & str & "<br>"
   Alpha = Left(str, 2)
   response.write "My Letters = " & Alpha & "<br>"
   Numeric = Mid(str, 3)
   response.write "My Numbers = " & Numeric
-----------------finish-------------------------------
FYI:
Mid Function:
Returns a specified number of characters from a string.
Mid(string, start[, length])

Left Function
Returns a specified number of characters from the left side of a string.
Left(string, length)



Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching a String Hello_kitty Access 1 August 17th, 2005 09:45 AM
Searching Within String zaeem Classic ASP Databases 3 May 10th, 2005 01:06 AM
Searching Within String zaeem VB Databases Basics 1 May 9th, 2005 03:04 PM
Searching for a string.... interrupt Javascript How-To 2 February 7th, 2005 01:00 PM
String Searching in a Table umagrama Access VBA 3 December 5th, 2003 12:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.