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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -