title: Regular expression to check strings containing a set of words separated by a delimiter
body: <p>As the title says, I'm trying to build up a regular expression that can recognize strings with this format:</p>
  
  <pre><code>word!!cat!!DOG!! ... Phone!!home!!
  </code></pre>
  
  <p>where <code>!!</code> is used as a delimiter. Each word must have a length between 1 and 5 characters. Empty words are not allowed, i.e. no strings like <code>!!</code>,<code>!!!!</code> etc.</p>
  
  <p>A word can only contain alphabetical characters between <code>a</code> and <code>z</code> (case insensitive). After each word I expect to find the special delimiter <code>!!</code>.</p>
  
  <p>I came up with the solution below but since I need to add other controls (e.g. words can contain spaces) I would like to know if I'm on the right way.</p>
  
  <pre><code>(([a-zA-Z]{1,5})([!]{2}))+
  </code></pre>
  
  <p>Also note that empty strings are not allowed, hence the use of <code>+</code></p>
  
  <p>Help and advices are very welcome since I just started learning how to build regular expressions. I run some tests using <a href="http://regexr.com/" rel="nofollow noreferrer">http://regexr.com/</a> and it seems to be okay but I want to be sure. Thank you!</p>
  
  <p>Examples that shouldn't match:</p>
  
  <pre><code>a!!b!!aaaaaa!!
  a123!!b!!c!!
  aAaa!!bbb
  aAaa!!bbb!
  </code></pre>