Originariamente inviato da kokkus
grazie per l'aiuto , ma c'è un problema...
mi prende tutti i numeri che sono scritti staccati anche se prima non c'è scrito tel
io vorrei solo i numeri in cui prima c'è scritto tel.
Andrebbe bene anche se mi prende ti tel 19:00
Dopo quelli nel caso li rifiltro...
codice:
<%
stringa = "hkhfjkdskjdhsadjdhj tel 05489755 jksdhjsq d l l lkj tel. 035/45488 hjdhsjd hsajhd jsadhjshd jsashdjs j tel:04554545 kjdjkqwdjqwh 321786321j3h2 3u2321j32 jk21 2jk3 h1jk1 tel"
stringa = replace(stringa,"/","")
stringa = replace(stringa,"\","")
stringa = replace(stringa,":"," ")
stringa = replace(stringa,".","")
elementiStringa = split(stringa)
dim numeri()
n = 0
for i = 0 to uBound(elementiStringa)
if inStr(elementiStringa(i),"tel") > 0 and i < uBound(elementiStringa) then
if isNumeric(elementiStringa(i+1)) then
reDim preserve numeri(n)
numeri(n) = elementiStringa(i+1)
n = n + 1
end if
end if
next
for y = 0 to uBound(numeri)
response.write numeri(y) & "
"
next
%>