So I tried to get this backreferences to work, but I can't figure it out for the life of me.
Currently I have this string <% size_../files/file.rar %> and I need to replace it with the actual file size.
This is what I have so far.
$oldStr = "<% size_../files/file.rar %>";
$newStr = preg_replace("/<% size_(\w+) %>/", filesize("$1"), $oldStr);
Basically I need to get the pattern (\w+) and use it for via filesize function.
preg_replace_callback()+\w->[\w./]