title: Regex semicolon and words
body: <p>I am facing some difficulties because of some regex expression in Java. I want a expression the validates that one or more words are valid and are delimited by semicolon or not.</p>
  
  <p>Examples:</p>
  
  <pre><code>VF;VM - Good
  VF;GM - Bad
  VF,VM - Bad
  VF;VM;IF - Good
  VF,VM;IF - Bad
  </code></pre>
  
  <p>I tried this one:</p>
  
  <pre><code>String regex = "(\\bVM\\b|\\bVF\\b|\\bTV\\b|\\bIM\\b|\\bIF\\b)|\\;";
  </code></pre>
  
  <p>But it doesn't work....</p>
  
  <p>If you can help me I will be thankful.</p>