I have trouble with this bit of code below. I would like it to return only the 41241597 part
(the contents of the first parentheses), or in other words make it lazier...
But I am not clear on how (.*) should be modified.
It would be good also to have a code that would return all the parentheses separately.
Like "41241597, 234,48 MiB", but I think I can manage that myself after some pondering :p
All help greatly appreciated 🙂
Thank you !
<?php
$content = '01 (41241597).avi</a> (234.48 MiB)';
$begintag = "\(";
$endtag = "\)";
preg_match("/($begintag)(.*)($endtag)/i", $content, $hits);
echo $hits[2]."<br>";
?>