Advertisement
illpastethat

PHP regex vtrelay

Nov 18th, 2013
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. I have this PHP regex string:
  2. preg_match('/<p><a href="TR\?fr_id=60186\&amp;pg=teamlist">([0-9]{1,}) teams<\/a> and <a href="TR\?fr_id=60186\&amp;pg=topparticipantlist">([0-9]{1,}) participants<\/a> have raised <span id="tr-greeting-fundraisingStats">(.*)<\/span><\/p>/im', $file, $matches);
  3.  
  4. I want to grab the numbers from this string:
  5.  
  6. <p><a href="TR?fr_id=60186&amp;pg=teamlist">221 teams</a> and <a href="TR?fr_id=60186&amp;pg=topparticipantlist">1,001 participants</a> have raised <span id="tr-greeting-fundraisingStats">$23,323.16</span></p>
  7.  
  8. I think the comma in the 1,001 is messing it up.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement