| 
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| jon 
 
 
 Joined: 01 Oct 2004
 Posts: 40
 
 
 | 
			
				|  Posted: Thu Oct 28, 2004 1:20 pm    Post subject: Get substring in ASP |   |  
				| 
 |  
				| Hey all, 
 I need to extract a sub-string from a string, starting from the 5th character up to the 10th. Is there a simple APS function to do this, maybe substring or something like that?
 
 
 
 Thanks,
 
 Jon
 |  |  
		| Back to top |  |  
		|  |  
		| administrator Site Admin
 
 
 Joined: 01 Oct 2004
 Posts: 183
 
 
 | 
			
				|  Posted: Thu Oct 28, 2004 3:06 pm    Post subject: |   |  
				| 
 |  
				| To get a sub-string in ASP use the Mid VBScript function. In your case use:
 
 
  	  | Code: |  	  | sSubString = Mid(sString, 5, 5)
 
 
 | 
 
 
 
 Cheers
 _________________
 Peter
 ASP & ASP.NET Articles and Tutorials
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  
 Powered by phpBB © 2001, 2002 phpBB Group
 
 |