Jump to content

Basic preg_match question


All4172

Recommended Posts

Normally when I want to pull info out I would do something like:

[code]
preg_match('!<meta name="name" content="(.*?)"/>!is', $contents, $meta);
[/code]

That would pull anything out between content="someinfo goes here"/>

This time I'm attempting to say, if anything at all is between the quotes in content=" ">, then do this.  How would I test that something is between the quotes?

Link to comment
https://forums.phpfreaks.com/topic/14516-basic-preg_match-question/
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.