Silly regex giveing me a hard time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a list like this:
235 Some info
     12323 other 5 things
  No number on this line!
 43 something or other

I need to remove the first number from each line, so that I will get this:
Some info
other 5 things
No number on this line!
something or other

So I tried:
$data=preg_replace("//n[ ]*[0-9][ ]*/", "", $data);

That is (I think): any amount of spaces, followed by any number,
followed by any amount of spaces. This doesn't seem to be the way to
do it. Anybody have a better idea? Thanks.

Dotan
http://technology-sleuth.com

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux