Write an expression in javascript

Posted by Hero on Stack Overflow See other posts from Stack Overflow or by Hero
Published on 2010-04-27T06:59:32Z Indexed on 2010/04/27 7:03 UTC
Read the original article Hit count: 196

Filed under:

hi everybody... I need a javascript code that split a string like below:

Input string: "a=>aa| b=>b||b | c=>cc"

Output:

    a=>aa

    b=>b||b 

    c=>cc

I'd written different codes like:

split(/ \ | /)

or

Split(/ \| (?! \ |) /)

but didn't work.

please help me...

I really need it fast.

© Stack Overflow or respective owner

Related posts about JavaScript