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
execution of procedure
C# Data Update query
Can't identify windows 2003 server by name on my network
How do I add a due date column, and sort by the document date in AR Statements?
Passing combobox var to loaded swf as3
How to store a set in a field and how to maintain it dyamically?
Use .NET or SSIS to download Exhange email and process attachments
How can I reference information from one sheet to another by values selected in a drop down menu
How can I prevent changes to web browser proxy settings?
With regards to correlated subqueries does anybody know what the logical query processing order?