Jump to content

Wrong regex ?


Nuv

Recommended Posts

I need to extract the get part of solre.php i.e. c=204436 in this case.

 

<a href="solre.php?c=3-204436"class='nav' >

 

The code i am using is

preg_match_all('~<a\s+href="solre.php?(.*?)"class=\'nav\'\s+>~', $output, $out_new);

 

When i var_dump($output); i see that i am getting that page. However $out_new is empty. Is there anything wrong with my regex ?

 

Link to comment
https://forums.phpfreaks.com/topic/236712-wrong-regex/
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.