title: Regex for non empty string and 3 letter alphabetical
body: <p>I am trying to write Regex for a 3 letter alphabetical string which is not empty. I have tried the following </p>
  
  <pre><code>(?=(^$)|(\s+$))(?=[A-Z]{3})
  </code></pre>
  
  <p>I know that ?= acts as and operator,<code>(^$)|(\s+$)</code> check for non empty and white space, but the following regex is not working. unable to find out whats wrong in this. Any help would be appreciated.</p>
  
  <p>My regex should check first whether the string is empty and if the string is not empty then it should check whether is alphabetical and length is 3 following are examples</p>
  
  <p>1."" - should fail </p>
  
  <p>2."LGW" - Should pass</p>
  
  <p>3."LGWE" - should fail</p>
  
  <p>4."LG!@"- should fail</p>
  
  <p>5."12L"-should fail</p>