[Javascript] Split

BEKIM BACAJ trojani2000 at hotmail.com
Wed Dec 11 13:20:53 CST 2002


Try: var t=txt.split("\\")






>From: "Andrew Gibson" <andyg at ihug.co.nz>
>Reply-To: javascript at LaTech.edu
>To: <javascript at LaTech.edu>
>Subject: [Javascript] Split
>Date: Wed, 11 Dec 2002 23:23:17 +1300
>
>I'm trying to use split to separate out a file name from the complete
>string.
>
>from
>
>   var txt="C:\Copy\new.html"
>
>   I want to get "new.html"
>
>Whenever I try to use "\"  I get a  Unterminated String variable error
>   eg    var t=txt.split("\")
>
>Obviously the problem is in trying to use the "\"  character which is an
>escape char for JScript I beleive. But how can I solve my problem?
>
>Andrew
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail




More information about the Javascript mailing list