I was trying to change some parts of a joomla plugin, when I faced this part of it and I have no idea what it's doing.
Can someone please explain to me what these regular expressions and those ${4}
do?
$comStart = '';
$comEnd = '';
$output = JResponse::getBody();
$output = preg_replace('/\<meta name=\"og\:/', '<meta property="og:', $output);
$output = preg_replace('/\<meta name=\"fb:admins/', '<meta property="fb:admins', $output);
$output = preg_replace('/<(\w+) (\w+)="(\w+):(\w+)" (\w+)="([a-zA-Z0-9\ \_\-\:\.\&\/\,\=\!\?]*)" \/>/i', $comStart.'<${1} ${2}="${3}:${4}" ${5}="${6}" >'.$comEnd, $output);
FYI: This plugin is for displaying facebook and opengraph tags inside articles.