title: Inserting whitespace before capital letter in a string object
body: <p>I need to write a program where the user enters an object string like "HelloIamYourNeighbor" 
  and returns "Hello I am your neighbors"</p>
  
  <p>so far I have been able to convert the uppercase to lowers case but I am having trouble inserting the spaces between the capital letters.</p>
  
  <pre><code>for (int i = 0; i &lt; input.length(); i++) {
      if (input.contains("(?=\\p{Lu})")) {
          str.append(" ");
      }
      if (Character.isUpperCase(input.charAt(i)) &amp;&amp; i != 0) {
          str.setCharAt(i, Character.toLowerCase(input.charAt(i)));
  }
  }
  System.out.println(str);    
  </code></pre>