This is the sort of HTML string I will be performing matches on:
<span class="q1">+12 Spell Power and +10 Hit Rating</span>
I want to get +12 Spell Power and +10 Hit Rating
out of the above HTML. This is the code I wrote:
preg_match('/<span class="q1">(.*)<\/span>/', $gem, $match);
But due to <\/span>
it's escaping the /
in </span>
so it doesn't stop the match, so I get a lot more data than what I want.
How can I escape the /
in </span>
while still having it part of the pattern?
Thanks.