Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Driving Me Crazy
Message
De
24/01/2003 03:25:27
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Driving Me Crazy
Divers
Thread ID:
00744986
Message ID:
00744986
Vues:
51
Hi All,

I have been attempting to do a function for a couple of days now and I have got to the stage if I have to look at it again I am going to go bonkers.

I want my function to read through a string where I have a several start and end tags inside a lode of text.

I want to right out from the start tag to the end tag every time the start to end tags appear in the string.

This is what I have and I don't think I'm that far off.
lb = "start"
rb = "end"
StrString = a
lbStrPosition = ""
		
For Each StrEachTag In Split(StrString, Len(lb) - 5)
	If lbStrPosition = "" Then
		lbStrPosition = 1
	Else
		lbStrPosition = lbStrPosition + 3
	End If
	lbStrPosition = InStr(lbStrPosition, StrString, lb)
	rbStrPosition = InStr(lbStrPosition, StrString, rb)
	StrEnd = rbStrPosition - lbStrPosition + Len(rb)
	Response.Write Mid(StrString , lbStrPosition, StrEnd)
Next
I might be way off but if any VBScript Guru can help me I would really appreciate it.

Kind Regards,
Tarran Walker
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform