Updated preg_match to preg_replace_callback

Was throwing a deprecation error, figured it's worth fixing.