Split string once in javascript?

Posted by Stavros Korokithakis on Stack Overflow See other posts from Stack Overflow or by Stavros Korokithakis
Published on 2010-05-20T23:53:59Z Indexed on 2010/05/21 0:00 UTC
Read the original article Hit count: 225

Filed under:
|

How can I split a string only once, i.e. make "1|Ceci n'est pas une pipe: | Oui" parse to: ["1", "Ceci n'est pas une pipe: | Oui"]?

The limit in split doesn't seem to help...

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about split