Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 03-05-2007, 10:49 AM JS Split and \
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
HI

i want to split the below into a js array and split at \

C:\Development work SVN\news\images\DABF16Frying1.jpg

of course, \ is what we use when wish to define " so how do i split on \

any input would be appreciated.
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
 
Register now for full access!
Old 03-05-2007, 11:27 AM Re: JS Split and \
Insensus's Avatar
Ultra Talker

Posts: 487
Name: Mark Stegeman
Location: Netherlands, Europe
Trades: 0
\ is the escaping character for special characters, like ".
\ is also a special character so you would use: \\.
Code:
str.split("\\")
Regards,
Insensus
__________________
<?php ($helpfull>0)?$talkupation++ : '';?>
Insensus is offline
Reply With Quote
View Public Profile
 
Old 03-05-2007, 11:27 AM Re: JS Split and \
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by numbenator View Post
HI

i want to split the below into a js array and split at \

C:\Development work SVN\news\images\DABF16Frying1.jpg

of course, \ is what we use when wish to define " so how do i split on \

any input would be appreciated.
Code:
"C:\Development work SVN\news\images\DABF16Frying1.jpg".split('\\')
logic ali is offline
Reply With Quote
View Public Profile
 
Old 03-05-2007, 11:30 AM Re: JS Split and \
numbenator's Avatar
Webmaster Talker

Posts: 523
Location: London
Trades: 0
great , thanks for your input.
works a treat.
__________________

Please login or register to view this content. Registration is FREE
numbenator is offline
Reply With Quote
View Public Profile Visit numbenator's homepage!
 
Reply     « Reply to JS Split and \
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14851 seconds with 12 queries