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
split string
Error ORA-1722 when DAO is writing data to an Oracle 11g database
Count grade percentage
VS 2008: access rights under windows 7 when building an assembly
i have xenapp do i need xendesktop
Will this drive work in a Dell Latitude D620
Source: NETLOGON Event ID: 5773 error with in DNS
SBS2k8 E-mail alias already exists
Exchange Tabs not showing in Active Directory on new Domain Controller
basic question about graphs and gradients