codice:
Function PrintTags(StrIn,Tag)
Dim Match,Matches,Re
	Set Re = new RegExp
		Re.Global=True
		Re.IgnoreCase = True
		Re.Pattern = "\[" & Tag & "\]([\w\W]*?)\[/" & Tag & "\]"
		Set Matches = Re.Execute(StrIn)
		Response.Write "Tag trovati : " & Matches.Count & "
"
		For Each Match In Matches
			Response.Write Match.subMatches(0) & "
"
		Next
	Set Re = Nothing
End Function

PrintTags "parole parole [TAG]Testo contenuto ne tag [/TAG]Parole[TAG]Secondo tag[/TAG]","TAG"