How can I get number from a string?

(the number should be atleast 7 digits long)