[jQuery] String Parsing
[jQuery] String Parsing
I'm no great js programmer, but that looks about right.
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
andy@icglink.com
615.370.1530 x737
--------------//--------->
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On
Behalf Of Tombo
Sent: Tuesday, October 03, 2006 10:22 AM
To: discuss@jquery.com
Subject: [jQuery] String Parsing
this might not be jquery related, but i noticed there are a lot of savvy
javascript programmers in this mailing list.
i want to grab just the filename and extension from the following string:
str1="F:\\Test1\\Test2\\Test3\\test.txt";
i want to grab "test.txt"
i use this code:
file1=(str1.split("\\"))[(str1.split("\\")).length-1];
i was wondering if there is a better way to grab that part of the string
Thx for any help
--
View this message in context:
http://www.nabble.com/String-Parsing-tf2376878.html#a6622443
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/