<p>How can I match (PCRE) everything inbetween two tags?</p>

<p>I tried something like this:</p>

<blockquote>
  <p>&lt;!--\s&#42;LoginStart\s&#42;--&gt;(.*)&lt;!--\s&#42;LoginEnd\s&#42;--&gt;</p>
</blockquote>

<p>But it didn't work out too well for me..</p>

<p>I'm kind of new to regular expressions, so I was hoping if someone would be kind enough to explain to me how I would accomplish this, if its even possible with regular expressions.</p>

<p>Thanks</p>

PHP and regex?  Here's some suggestions:
```
```
'/<!--\s*LoginStart\s*-->(.*)<!--\s*LoginEnd\s*-->/Us'
```
```
Might be better - the
```
U
```
capitalized makes the regex non-greedy, which means it'll stop at the first
```
<!--
```
that may work.  But the important one is the
```
s
```
, which tells the regex to match a newline with the
```
.
```
character.
Depending on how certain you are on the capitalization, adding an
```
i
```
at the end will make the regex search case-insensitive.