php - stripping out all characters from a string, leaving numbers -
Hey, I have such a string:
v8gn5.8gnr4nggb58gng.g95h58g N48fn49t .t8t8t57
I just want to leave all the numbers (and .s)
How to do any idea? Is there a function prebilt?
Thanks
$ str = preg_replace ('/ [^ 0-9. ] + / ',' ', $ Str);
Replace the substrings that are not with the digits or not. nothing.
Comments
Post a Comment