title: How can I skip the space if the space came between two characters in JavaScript?
body: <p>I have the text:</p>
  
  <pre><code>first.getage()  person.getinfo( tow.fff(one) , data ) car.getcompany fff
  </code></pre>
  
  <p>I want to get the output :</p>
  
  <pre><code>first.getage()/person.getinfo( tow.fff(one) , data )/car.getcompany/fff
  </code></pre>
  
  <p>my problem when I split by the space I get the output :</p>
  
  <pre><code>first.getage(/)/person.getinfo(/tow.fff(one)/data/,/)/car.getcompany/fff
  </code></pre>
  
  <p>that happen because I have space between the ("( )") , so how I can to skip the space if the space came between the arcs ,so the output I want is :</p>
  
  <pre><code>first.getage()/person.getinfo( tow.fff(one) , data )/car.getcompany/fff
  </code></pre>
  
  <p>any help ? </p>