javascript split string on space or on quotes to array

Posted by Boriz on Stack Overflow See other posts from Stack Overflow or by Boriz
Published on 2010-05-12T09:52:09Z Indexed on 2010/05/12 10:14 UTC
Read the original article Hit count: 145

Filed under:
|
|
var str = 'single words "fixed string of words"';
var astr = str.split(" "); // need fix

i want the array to be like: single, words, fixed string of words.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about regex