<?php $fileContent = '12em\n1.3 em'; echo preg_replace_callback('/([0-9,-\.]+)\s*(em)/', 'replace_em', $fileContent); function replace_em($value) { return $value[0] * 123; }
You have javascript disabled. You will not be able to edit any code.