7stud -- wrote:
>
> result = str.gsub(/\D/, "")
>

\D is the symbol for any character except a digit, which is shorthand 
for [^0-9].
-- 
Posted via http://www.ruby-forum.com/.