dyluck Posted July 31, 2010 Share Posted July 31, 2010 Hi There, I need help to remove a string with a slash and numbers like this pattern /176-0723275-0880505 Everythign I have tried doesn't work Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/209397-preg_replace-pattern-help/ Share on other sites More sharing options...
jcbones Posted July 31, 2010 Share Posted July 31, 2010 $str = '/176-0723275-0880505'; $str = preg_replace('~/[0-9]{3}-[0-9]{7}-[0-9]{7}~','',$str); Quote Link to comment https://forums.phpfreaks.com/topic/209397-preg_replace-pattern-help/#findComment-1093389 Share on other sites More sharing options...
dyluck Posted July 31, 2010 Author Share Posted July 31, 2010 Thanks a ton! works great! Quote Link to comment https://forums.phpfreaks.com/topic/209397-preg_replace-pattern-help/#findComment-1093395 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.