Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HTML Question
Message
De
24/08/2012 18:18:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
24/08/2012 16:30:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01551320
Message ID:
01551407
Vues:
90
Something like this:
function UnTag(tcString)
*[2010/06/24 17:44:25] ndragan - strip html, return text.
	local c, lcTag
	#define hLT "<"
	#define hGT ">"
	c=tcString
	do while hLT$c
		lcTag=strextract(c, hLT, hGT,1,4)
		c=strtran(c, lcTag, "")
	enddo
	return c
But this is only the starter... because in code tags, wrapped around any script, you may find the < inside the code, and that will throw this off.

The safer way is to find a tag first, by strextract(c, "<", " ",1,4), then find the matching > for it; then find the </tag and its matching > and then strtran those two with a "". Proceed as long as you keep finding pairs.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform