the read function can be applied to a string and then the numberp function tests whether the read object represents a number or not, integer, or float.
(mapcar (lambda(x)(numberp(read x))) (list "123" "1.23" "sqrt(123)" "12e-3" "12ab3")) =>
(t t nil t nil) You catch any error with this function
(defun string-numberp(s) (condition-case invalid (numberp(read s)) (error nil))) Test :
(mapcar #'string-numberp (list "12345" "12.345" "#12345" "." "," "\n")) =>
(t t nil nil nil nil)