[Javascript] Split

Peter Brunone peter at brunone.com
Tue Dec 10 17:40:46 CST 2002


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

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Andrew Gibson
|Sent: Wednesday, December 11, 2002 4:23 AM
|To: javascript at LaTech.edu
|Subject: [Javascript] Split
|
|
|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
|



More information about the Javascript mailing list