regex - How to replace backslash in AS3 Flash? -


i'm trying replace backslashes of url/path file name of swf:

var path:string = "c:\test\myswf.swf"  var swfurl:string = path.replace(/\\/gi, "/");  var swffilename:string = path.slice(path.lastindexof("/")+1, path.length).replace(".swf", ""); 

but doesn't works. response is: 'c:testmyswf.swf'. it's doesn't replace string path. how can it?

i think might need escape backslashes within url string:

var path:string = "c:\\test\\myswf.swf" 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -