Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = 'This is S3F8G m7j34m h98H40D-3D39 90843-432423 LSDF3 4X4it very good 343c3.';;
- preg_match_all("/(^[\D]+\s|\s[\D]+\s|\s[\D]+$|^[\D]+$)+/",$str,$result);
- $result = implode('',$result[0]);
- echo $result;
Add Comment
Please, Sign In to add comment