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
Delphi, forms in Dll and Threads
checking what is TRANSACTION ISOLATION LEVEL right now
SBS 2k3 unable to relay mails
Perl, Using Text::CSV_XS / Count number of references
Joomla Re-install
New ESXi install fails (PSOD)
Virtual to Physical using WinImage:V2P
Windows 7 - Windows could not be activated
find textbox and start div underneath it
MySQL data need to "replace" CRLF