title: Find whole line that contains word with php regular expressions
body: <p>I want to search for a word "session" in a text. But I would like to retrieve the whole line in which this word appears. So far I have come up with this. </p>
  
  <pre><code>$pattern="[^\\n]*session[^\\n]*";
  preg_match_all($pattern,$content, $matches, PREG_OFFSET_CAPTURE);
  </code></pre>
  
  <p>But I get an error "Unknown modifier '*'". Any ideas how to make such an regular expression?</p>