title: Regex to allow letters, one space between words and a total length of 50
body: <p>I'm trying to build a regular expression with the following conditions:</p>
  
  <ul>
  <li>Only letters </li>
  <li>One space between words (no more than one space)</li>
  <li>Maximum length 50 </li>
  </ul>
  
  <p>And this is what I have done so far:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>^(([A-Za-z]+( [A-Za-z])+){1,50})$
  </code></pre>
  
  <p>This allows me to validate the spaces between words and only letters conditions but it is not working for the length and it's not working for words without spaces, example:<code>hello</code>. Can someone help me with this?</p>
  
  <p>Example:</p>
  
  <p>What I need:
  Regex that allows sentences (with max length 50) like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>Hello this is an example
  Hello
  a b c
  </code></pre>