Jump to content

How to put these two preg_matches into one..


Scooby08

Recommended Posts

I'm trying to figure out how to put this preg_match line into one:

 

if (preg_match('/<meta name="keywords" content="(.*)?">/im', $file, $match) || preg_match('/<meta name="keywords" content="(.*)?" \/>/im', $file, $match)) {

 

The difference is the closing part of the tag..

 

either this: >

or

this: />

 

How would I do an either or on that part?

 

Thanks

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.