javascript - Decompose a string using regex -


i need decompose string javascript.

the initial string:

$var="1234 => 4242,example mailbox,root@localhost" 

the 4 decomposed parts:

1234 4242 example mailbox root@localhost 

what more efficient way: use regular expression or call string functions?

can please provide regex extract such patterns, using groups.

here solution little less restrictive :

$var.split(/\s*,\s*|\s*=>\s*/) 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -