Jump to content

search filter


jmurch

Recommended Posts

just check if it's there:

 

if (preg_match('~/var/iso/.*?\.pdf~',$string)) {
  // it's there, do something
}

match and capture:

 

preg_match('~(/var/iso/.*?\.pdf)~',$string,$match);
echo $match[1];

 

match more than once and capture:

 

preg_match_all('~(/var/iso/.*?\.pdf)~',$string,$matches);
print_r($matches);

Link to comment
https://forums.phpfreaks.com/topic/154284-search-filter/#findComment-811127
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.