> -----Original Message----- > From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: 24 July 2003 18:44 > > > Let's say I have a number: 12800001924 > > > > The rules call for removing "1280+", meaning remove 128 and > all 0's that > > come after it, until you run into another number. > > > > In the end, it would leave 1924, and everything else on the > beginning > would > > be gone. > > $new_number = preg_replace('/^1280+/','',$number);
Beat me to exactly that solution by a hairsbreadth! Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php