title: PHP Regex for get line between # and #
body: <p>I'm kind of stuck with a very simple regex. I've already tried a lot of thing but without result so I'll go with the simple : </p>
  
  <p>I want to get a multiline result (for replace it later but I have already wrote this part and it works good) which supposed to be between '#' char. here the sample file :</p>
  
  <pre><code># Zulu 9.8.9.8
  add method 9.8.9.8 {ssh} {telnet}
  add password 9.8.9.8 {jouejoue}
  add user 9.8.9.8 {Zekrom}
  # Zulu 1.1.1.1
  add method 1.1.1.1 {ssh} {telnet}
  add password 1.1.1.1 {mypassword}
  add user 1.1.1.1 {adminstyle}
  # Zulu 2.2.2.2
  add method 2.2.2.2 {ssh} {telnet}
  add password 2.2.2.2 {diffpassword}
  add user 2.2.2.2 {pixyokadi}
  </code></pre>
  
  <p>I used 's' option like '/regex/s' so "\n" will be count in '.' char. I wanted to use [^#] but it cancelled the 's' option. I don't know why but when using this one :</p>
  
  <pre><code>/#.*#/s
  </code></pre>
  
  <p>It takes the 2 first paragraph ignoring the '#' at line '# Zulu 1.1.1.1' and I don't understand why. I've tried to use capture-parenthesis too without success. I used to search the IP with a regex but since I can't even get the paragraph I wanted, I used a more simple one. Could someone explain this to me ?</p>
  
  <p><a href="https://regex101.com/r/tI4hQ7/2" rel="nofollow">https://regex101.com/r/tI4hQ7/2</a></p>
  
  <p>Thanks for reading.</p>