title: Regex to pull out numbers from format such as 1+2+2.5 with some additional rules
body: <p>I am trying to validate numbers in format such as <code>3.5+1+2+2.5</code> using regex,  with these rules:</p>
  
  <p><strong>1)</strong> each number is a multiple of <code>0.5</code></p>
  
  <p><strong>2)</strong> each number is at least <code>1</code></p>
  
  <p><strong>3)</strong> only one number is required</p>
  
  <p>For example:</p>
  
  <pre><code>`2.5+1`     Validates
  `1+2+2.5`   Validates
  `1`         Validates
  `1.6`       INCORRECT
  `1+2+`      INCORRECT
  `1+2+2.5+6` Validates
  </code></pre>
  
  <p>I guess its possible? but I am struggling with this faulty pattern:</p>
  
  <pre><code>$value = '3.5+1+2+2.5';
  if (preg_match('/^(\d(\.5)?)(\+\d(\.5)?)*/', $value)) {
      echo array_sum(explode('+', $value));
  }
  </code></pre>
  
  <p>But above pattern seems to be validating everything.</p>