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 -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

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