title: Need to match multiple pattern in the same line - Perl
body: <p>I need to match multiple pattern in the same line. For example, in this file:</p>
  
  <pre><code>Hello, Chester [McAllister;Scientist] lives in Boston [Massachusetts;USA;Fenway Park] # McAllister works in USA
  I'm now working in New-York [NYC;USA] # I work in USA
  ...
  </code></pre>
  
  <p>First, I want to match every string into the brackets knowing that it is possible to have more than 1 pattern and also that we can have 1 to <em>n</em> strings into the brackets always separated by a semicolon.</p>
  
  <p>Finally, for each line i need to compare the values to the string located after the <code>#</code>. For example in the first sentence, i want to compare:</p>
  
  <pre><code>[McAllister;Scientist] &amp; [Massachusetts;USA;Fenway Park] TO "McAllister works in USA"
  </code></pre>