Micah Gersten a écrit :

Yep, with a regex, it's real easy (untested code):

  So easy you got two bugs :

<?php

$fileData = file_get_contents("text,txt");

I hope you don't really do that in production code. It can be bogus with big files.

$newFileData = preg_replace('/^\d+?\.\s?(.*$)/m','/$1/', $fileData);

  Buggy regex.

And text,txt is a correct filename, I don't understand why you worry about :D

--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to