title: Regex to get all in between the brackets
body: <p>I am trying to get the content from this paragraph but regex I am using is not working when I remove line brake from the paragraph then regex work otherwise it is not working please tell me what do I do? </p>
  
  <p>Here is the paragraph:</p>
  
  <pre><code>&lt;span class="st"&gt;My Paragraph - you can download free &lt;b&gt;drivers&lt;/b&gt; for audio, video, chipset, Wi
  Fi or USB, or a &lt;b&gt;driver&lt;/b&gt; installation pack for &lt;b&gt;notebook&lt;/b&gt;/(for&amp;nbsp;...&lt;/span&gt;&lt;br&gt;&lt;/div&gt;
  </code></pre>
  
  <p>My Regex:</p>
  
  <pre><code>preg_match_all('/&lt;span class="st"&gt;(.+?[^\n])&lt;\/span&gt;&lt;br&gt;&lt;\/div&gt;/i', $file_strings, $ti);
  </code></pre>
  
  <p>When I use this paragraph it works </p>
  
  <pre><code>&lt;span class="st"&gt;My Paragraph - you can download free &lt;b&gt;drivers&lt;/b&gt; for audio, video, chipset, WiFi or USB, or a &lt;b&gt;driver&lt;/b&gt; installation pack for &lt;b&gt;notebook&lt;/b&gt;/(for&amp;nbsp;...&lt;/span&gt;&lt;br&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Output should look like this</p>
  
  <pre><code>My Paragraph - you can download free &lt;b&gt;drivers&lt;/b&gt; for audio, video, chipset, WFi or USB, or a &lt;b&gt;driver&lt;/b&gt; installation pack for &lt;b&gt;notebook&lt;/b&gt;/(for&amp;nbsp;...
  </code></pre>
  
  <p>as you can see I just removed line brake from wifi and it's working but I need regex which works without removing that line brake </p>
  
  <p>See this screenshot where I am testing my regex
  <a href="http://s12.postimg.org/v1ava8vdp/screenshot.jpg" rel="nofollow noreferrer">Screenshot</a> I am testing it here 
  <a href="http://www.phpliveregex.com/" rel="nofollow noreferrer">Regex tester</a> </p>
  
  <p><strong>Solution By:</strong>
  <a href="https://stackoverflow.com/users/3110638/jonny-5">@jonny-5</a></p>
  
  <p>Adding iS instead of i after forward slash solved the problem</p>
  
  <pre><code> preg_match_all('/&lt;span class="st"&gt;(.+?[^\n])&lt;\/span&gt;&lt;br&gt;&lt;\/div&gt;/is', $file_strings, $ti);
  </code></pre>