Microsoft
Software
Hardware
Network
Question : Check numbers in string
I have a string, that could have SSSSSS-SSSS or SSSSSSSSSS ( S = number 0-9). I need someting to check this. That means it could be 10 numbers with or without the '-'. How could I check it the easiest way?
return true if valid. return false otherways.
Answer : Check numbers in string
Try
1: 2:
final String RE = "\\d{6}-?\\d{4}"; boolean valid = s.matches(RE);
Random Solutions
connect an iPhone to Windows SBS 2003
VNC server Ubuntu 10.04
OWA Setup
Get the ip of the server running the application
disable edit , new record links
Registry key property value
lower lights
call .rdl with store procedure with parameter
Can I add multi-millions of records to SQL database while replication is on? Will it work?
unknown process - should I be concerned