title: Javascript Regex to filter String
body: <p>I need Regex to filter string to fit with the following conditions :</p>
  
  <ul>
  <li>The total length of the string cannot exceed 300 characters.</li>
  <li>The string cannot contain more than 4 hashtags.</li>
  <li>The string cannot contain more than 1 URL.</li>
  <li>The string cannot consist of all capital letters.</li>
  </ul>
  
  <p><strong>Example Valid Text :</strong></p>
  
  <blockquote>
    <p>Developers trust #StackOverflow to help solve #coding problems and use
    Stack Overflow Careers to find job opportunities. Please visit
    <a href="https://stackoverflow.com/">https://stackoverflow.com/</a></p>
  </blockquote>
  
  <p><strong>Example Invalid Text :</strong></p>
  
  <blockquote>
    <p>Developers trust #StackOverflow to help solve #coding problems and use
    Stack Overflow Careers to find job opportunities. Please visit
    <a href="https://stackoverflow.com/">https://stackoverflow.com/</a> or <a href="https://stackoverflow.com/company/about">https://stackoverflow.com/company/about</a></p>
  </blockquote>
  
  <p>Invalid string above because there are containing two URL.</p>
  
  <p>Any help would be appreciated and thank you very much :)</p>