title: Regular expression for name with spaces allowed in between the text and avoid spaces when there is no text
body: <p>Hello I'm trying to write a regular expression for user name in my form. </p>
  
  <p>The regular expression should allow spaces and . when the text is written </p>
  
  <p>Ex : S. Harish Kumar</p>
  
  <p>Check the regEx that I have written so far </p>
  
  <pre><code>^[a-zA-Z\s\.]*$
  </code></pre>
  
  <p>The above regEx also accepts any string with just spaces and . which I don't want.  Can you help me with the perfect regEx which doesn't accept spaces and . when no text is entered?</p>
  
  <p>Thanks in advance :)</p>