将strpos与正则表达式结合起来

Here's the skinny. I'm using imap to get into Gmail, and using that for database entries. I'm having quite the headache of it to. The main issue is that I'm getting all sorts of random '=''s in my body. I can get around most of it, but the headache comes from primarily one source. I'm isolating out JUST the reply, and the email body is similar to this.

<div dir="ltr">Quick Quick! He's Drowning!!!!!!</div><div class="gm=
ail_extra"><br clear="all"><div>Thank you<div>Daniel Jenkins</div><div>Te=
chnical Assistant</div><div><a href="[url]" target="_blank">=
[work]</a><br>
</div><div>[phone number here]</div></div>
<br><br>

Now, I don't need the email signature, I just need the part before it. What I'm trying to do is strpos the <div class="gmail_ extra line, but it's a moving target because of the =. It's been after the a, the l, the g, etc. Is there a way to strpos(<div calss=g[=]?m[=]?a[=]?i[=]?l[=]?)?

The ending = is a soft return / newline in quoted-printable encoding, just use:

$string = quoted_printable_decode($string);

... which will also take care of other unexpected differences between encoded body & actual content. After that you should have nice predictable HTML (which you would run through a parser rather then trying to split it with a regex).