alohatofu Posted May 15, 2007 Share Posted May 15, 2007 hello I have this number 0030007 I would like to take away the first 2 zeros ONLY and display me the last 5 digits ONLY. I've tried using /[1-9]{5}/ but it doesn't work Can somone please help? Thanks Quote Link to comment Share on other sites More sharing options...
Wildbug Posted May 15, 2007 Share Posted May 15, 2007 preg_match('/$0*(\d{5})/',$var,$match); echo $match[1]; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.