I’m looking at some code that has
preg_match('/\[youtube ([[:print:]]+)\]/', $content, $matches)
$content could be a link such as *http://www.youtube.com/watch?v=some_video*
I can see it’s filtering for youtube video, but I don’t get how it’s doing it. More specifically, what’s the role of [:print:]?
Your answer is here: http://www.php.net/manual/en/function.preg-match-all.php#81559
“[:print:] – printing characters, including space”