I might have read this wrong ... But you just want to check if a string
is a number or not?
Check Integer.parseInt(stringValue); and Double.parseDouble(stringValue);
It can lead to some messy code, you can make neater code by using regX
... but you can worry about regX later