Are there browsers which can only handle strings or single char strings?
Being able to use a regex in this situation is incredibly awesome. It seems to work great on Chrome, too.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can use either a string or a regular expression as the argument to
.split(). See doc at MDN or page 148 in the ECMAScript spec for more info.