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
Request for the permission of type 'System.Net.Mail.SmtpPermi
ssion, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193
4e089' failed
Google Maps , ahhhh help pls!
dlookup error in access
extending jQuery autocomplete plugin functionality
Ho to customize flash paper interface
How do I read Metastock data using C#?
How do I assign a preview image to the TSavePictureDialog
Replacing Keyboard on Toshiba Portege A600
Post data back to jquery
mouse click on image of TcxPageControl (Tab image)