
July 9th, 2012, 02:17 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 2
Time spent in forums: 54 m 55 sec
Reputation Power: 0
|
|
|
Add white space to regular expression
Hi,
I have these two regular expressions:
@"^([1-9]\d{8})$"
@"^([0-4][0-9][0-9])$"
At the moment, if the user enters a space e.g. 22 22 22222, then it returns as invalid because the regular expressions don't accept any white space.
I would like the user to be able to enter white spaces as well as not entering white space and the number being returned as valid.
e.g. 22 22 22222 and 222222222
Please can someone help me amend the above regular expressions so that they also allow the user to enter both white space and no white space?
Thank you very much
|