title: Perl - search in a string
body: <p>I would like to know, if <code>$search</code> is not in the <code>$content</code>. The search string should not be in the h2 tag. </p>
  
  <pre><code>my $search="Hello World";
  my $content="&lt;p&gt;Hello World&lt;h2&gt;Is Hello World inside this tag?&lt;/h2&gt;&lt;p&gt;Thank you";
  
  if ($content !~ /&lt;h2&gt;.*?($search \&lt;\/h2\&gt;)/;) {}
  </code></pre>
  
  <p>This works not. Has anybody an idea?</p>