Forum Moderators: open
suppose i have this url string
http://example.com/zip/wp-websnapr-0.1.zip
i need my javascript to make a complete search on that string so that it recognizes if it ends up with
.zip
.exe
.rar
.swf
etc...
my initial approach was:
str = new String(nodes[i]);
result = str.lastIndexOf(".zip");
alert(result);
but its getting to dumb to code. i need something more dinamic. any ideas?
[edited by: jatar_k at 6:20 pm (utc) on Oct. 23, 2006]
[edit reason] examplified [/edit]