Hi,
I have a string input
"abc def 50 ghi jhk lmn 63 op qrst"
i need to output this string in reverse without touch the numbers
"tsrq po 63 nml khj ihg 50 fed cba"
i created a vb function
function strWords(s,length)
strWords = ""
s = replace(s,")"," ( ")
s = replace(s,"("," ) ")
s = replace(s,"-","- ")
s = replace(s," ( "," ( ")
s = replace(s," ) "," ) ")
dim sArray
sArray = split(s)
counter = 0
for i = 0 to ubound(sArray)
tempStr = sArray(i)
counter = counter + len(tempStr)
if len(tempStr) => 1 then
if Asc(left(tempStr,1)) => Asc("0") and Asc(left(tempStr,1)) <= Asc("9") then
strWords = tempStr & " " & strWords
else
strWords = StrReverse(tempStr) & " " & strWords
end if
end if
if counter > 20 then
strWords = "<br>" & strWords
counter = 0
end if
next
end function
the problem is that i need to split the string into +-10 char. like this
" 50 fed cba"
"nml khj ihg "
"tsrq po 63 "