java
public boolean isNumeric(String str){ Pattern pattern = Pattern.compile("^-?[0-9]+\\.?[0-9]*"); Matcher isNum = pattern.matcher(str); if( !isNum.matches() ){ return false; } return true; }python
def isNum(value): try: int(value) + 1 except: return False else: return Trueoracle
create or replace function func_is_number( sx in varchar) return int is x number; beginx:=to_number(sx);return 1;exception when others thenreturn 0; end;