title: Get the first letter of each word in a string using regex
body: <p>I'm trying to get the first letter of each word in a string using regex, here is what I have tried:</p>
  
  <pre><code>public class Test
  {
      public static void main(String[] args)
      {
          String name = "First Middle Last";
          for(String s : name.split("(?&lt;=[\\S])[\\S]+")) System.out.println(s);
      }
  }
  </code></pre>
  
  <p>The output is as follows:</p>
  
  <pre><code>F
   M
   L
  </code></pre>
  
  <p>How can I fix the regex to get the correct output?</p>