Jump to content

Preg_match a number with <b> tags


sphinx

Recommended Posts

Hi there,

 

I'm trying to preg match information on a page that is laid out like:

 

<b>5</b>

 

I'm attempting to preg match it via:

 

preg_match('/<b>([0-9]+)</b>/', $page_contents, $matches);

 

I'm aware I need to backslash it somewhere, I've tried in multiple areas, but I'm still getting an Unknown multiplier error.

 

Regards

 

Link to comment
https://forums.phpfreaks.com/topic/249144-preg_match-a-number-with-tags/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.