Reputation: 385
i am parsing same HTML i need to get a number from a line of HTML
<div class='overflow150'><a style='display:block;height:15px;' href="javascript://" onclick="openPlayerDetailsWindow(27435430)">Jan Partljiè</a></div>
i need the numbers inside the parethsis at openPlayerDetailsWindow(27435430)
i am trying the following but no luck:
preg_match('#\((.*?)\,#', $html_row, $player_id);
i am such a newbie with pre match, any help?
Upvotes: 0
Views: 218
Reputation: 2282
Try using:
preg_match('#\(([0-9]+)\)#', $html_row, $player_id);
$player_id = $player_id[1];
Upvotes: 1