title: Regular Expression to match only whitespace
body: <p>How can I write a regular expression that matches whitespace only?  </p>
  
  <p>I have a Ruby application that allows me to match my email subject and body based on regular expressions.  I do not have access to the code.</p>
  
  <p>I am trying to take action on empty email bodies.  The regex should match if an email body contained all newlines and space characters. It would not match if there was a single alphanumeric character.  The regex should allow whitespace at the start and and of the email body.  </p>
  
  <p>The following email body would not be matched. I've highlighted it to show the line breaks.</p>
  
  <p><img src="https://imgur.com/uJ7prQT.jpg" alt="Imgur image of email body"></p>
  
  <p>The following email body would be matched. </p>
  
  <p><img src="https://imgur.com/Zkv2o9o.jpg" alt="Imgur image of email body"> </p>
  
  <p>I've tried various things using Rubular</p>
  
  <p>The best I can get is <code>^\s*$</code> but this matches newlines.</p>