Jump to content

need help with curl and preg_match


ZoCX

Recommended Posts

hello there, i want to preg_match someting from curl "keywords"

 

example

 

<meta content='bla bla bla...' name='description' />

<meta content='bla bla bla...' name='keywords' />

 

how you can see all start disame with " <meta content=' " how i can make the preg_match to get the last " <meta content=' " and not the first one, i just need the preg_match command

 

i try this command ...

 

  $patterns[3]    = '/(?:.*)<meta content=\'(.*?)\' name=\'description\' \/>(?:.*)/i';

  $replacements[3] = 'Desc=[$1]<br />';

Link to comment
https://forums.phpfreaks.com/topic/249799-need-help-with-curl-and-preg_match/
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.