im trying to retreive a list of Wordpress Posts with get_posts,
After that, i want to search in the post_content if there any match of a specific string.
right now, my code is:
if(preg_match('/\b[download id="2"]\b/i', $value->post_content)){
echo('match');
}else{
echo('nomatch');
}
But it return alway a match.
What i'm doing wrong?
/\b\[download id="2"\]\b/i.