le regular expression
in pratica imposti un pattern come
reg.pattern = "[.]([^.]+)$"
e hai l'estensione
esempio dello script completo
codice:
Dim objRegExp
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "[.]([^.]+)$"
dim miofile, matches, estensione
miofile = "ciao.ciao.doc"
if objRegExp.Test(miofile) then
set Matches = objRegExp.Execute(miofile)
estensione = Matches(0).SubMatches(0)
end if
set Matches = Nothing
set objRegExp = Nothing
response.write estensione
l'esensione te la trovi in ESTENSIONE
(in questo caso DOC)
ciao