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, 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); 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! Link to comment https://forums.phpfreaks.com/topic/209397-preg_replace-pattern-help/#findComment-1093395 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.