regex - Classic ASP CStr not working -


i need error 800a000d - type mismatch receiving in sub bellow:

<!-- #include file="regex.asp" --> <% call moverzipado()  sub moverzipado()     dim nomearquivozip, nomearquivo      nomearquivo = request("nomearquivo")     nomearquivozip = nomearquivo(trim(cstr(nomearquivo)))&".zip" 'here problem end sub 

this querystring: ?nomearquivo=arquivo.zip

this regex.asp include. working.

<% function regexresults(strtarget, strpattern)      set regex = new regexp     regex.pattern = strpattern     regex.global = true     set regexresults = regex.execute(strtarget)     set regex = nothing  end function  function nomearquivo(arquivo)     set arrresults = regexresults(arquivo, "(.*)\..*")      each result in arrresults         nomearquivo = result.submatches(0)     next      set arrresults = nothing end function  'response.write(nomearquivo("file.exe")) prints "file" here works. %> 

does know happening?

vbscript not case sensitive. appears have variable , function same name. try changing name of function or variable.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -