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

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -