Forum Moderators: coopster
I'm using regular expressions, but have run into a problem.
Running it like this:
$strToSearch = $result;
preg_match( '/Videos \([^0-9]*([0-9,]+)/i', $strToSearch, $vidmatches );
var_dump ($vidmatches);
Gives me this when I do var_dump:
9array(2) {
[0]=>
string(49) "Videos (<a href="/profile_videos?user=RonPaul2008"
=>
string(4) "2008"
}
It works dandy, but it grabs the number out of their username. =S
How can I get around this? Is there a way to specify "but not this number"?
HTML Source I'm coming from:
<span>Videos (<a href="/profile_videos?user=RonPaul2008dotcom" class="headersSmall">42</a>)</span>
Thanks for all your help! =D
Spanger