string split '\' in jquery or javascript -



string split '\' in jquery or javascript -

i tried split string special character '\' not working.

str = 'c:\images\jhjh.jpg'; result = str.split('\');

help me resolve issue. in advance

your input string should escape \ , should escape \ in split function argument well.

this should work

str = 'c:\\images\\jhjh.jpg'; result = str.split('\\');

javascript jquery tokenize

Comments

Popular posts from this blog

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -