function splitNum(a)
for i=1 to len(a)
if not IsNumeric(right(a,i)) then
splitNum=right(a,i-1)
exit for
end if
next
end function
msgbox(splitNum("123aaa-321"))
<%
dim regEx,Matches
dim str1
str1="123asd12 "
set regEx=new regExp
regEx.Pattern= "([0123456789.]+?)([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]+?)([0123456789.]+?)(\s)"
regEx.IgnoreCase=true
regEx.Global=True
set Matches=regEx.Execute(str1)
for each Match in Matches
Response.Write Match.Submatches(2) & "<br>"
next
set Matches=nothing