title: Substring with dynamic length
body: <p>I need to get value of below string into 2 variables.</p>
  
  <p>Input</p>
  
  <blockquote>
    <p>6.3-full-day-care</p>
  </blockquote>
  
  <p>Expected output:</p>
  
  <pre><code>var price=6.3; //The input is dynamic.Cannot get fixed length
  var serviceKey="full-day-care";
  </code></pre>
  
  <p>How can I do that? <code>Substring</code> doesn't help here.</p>