title: Perl, Any match string after a pattern
body: <p>I'm trying to match if any string exists after a certain pattern.
  The pattern is "pattern" 'anything in between' "[after]". case insensitive.</p>
  
  <p>e.g </p>
  
  <pre><code>pattern 1 [after] ABC
  pattern 2 [after] 123 abc DEX
  pattern 3 [after] 
  pattern 12345123 [after]
  pattern @ASd#98 @_90sd [after] xyz dec
  [after] 4 pattern
  </code></pre>
  
  <p>So the result I would like to obtain is,</p>
  
  <pre><code>pattern 1 [after] ABC
  pattern 2 [after] 123 abc DEX
  pattern @ASd#98 @_90sd [after] xyz dec
  </code></pre>
  
  <p>It begins with "pattern" and ends with "[after],  anything sandwiched between is also accepted.</p>
  
  <p>I'm having difficulty incorporating the delimits of [ ] &amp; if string exists together.</p>
  
  <p>I've tried, the closest I've gotten ends up matching</p>
  
  <pre><code>m/pattern/ ../ \[after]/
  
  pattern 1 [after] ABC
  pattern 2 [after] 123 ABC DEX
  pattern 3 [after] 
  pattern 12345123 [after]
  pattern @ASd#98 @_90sd [after] xyz dec
  </code></pre>
  
  <p>But I don't need the 3rd or 4th pattern as it doesn't hold any numerics or characters after "[after]".</p>
  
  <p>Thanks</p>