J
jayanthigk2004
Is it possible to write a regular expression for this ?
Pattern: 999-99-999
Where 9 is any number from 0 to 9
However the user need not enter ALL the digits and dashes as given in
the format.
Whatever numbers and dashes he had entered must match the above format,
from left to right, for only the charcters he has entered.
For example
9
99
999
999-
999-9
999-99
999-99-
999-99-9
999-99-99
999-99-999
Any of the above should result in a match
Next, he can also put * before or after or before and after any of the
above combination
Ex
*9
*99
*999
*999-
*999-9
*999-99
*999-99-
*999-99-9
*999-99-99
*999-99-999
Or
9*
99*
999*
999-*
999-9*
999-99*
999-99-*
999-99-9*
999-99-99*
999-99-999*
Or
*9*
*99*
*999*
*999-*
*999-9*
*999-99*
*999-99-*
*999-99-9*
*999-99-99*
*999-99-999*
Any help is much appreciated.
Reply »
From: (e-mail address removed) - view profile
Date: Thurs, Oct 5 2006 6:52 pm
Email: (e-mail address removed)
Groups: microsoft.public.dotnet.languages.csharp
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author
Is it possible to write a regular expression for this ?
Pattern: 999-99-999
Where 9 is any number from 0 to 9
However the user need not enter ALL the digits and dashes as given in
the format.
Whatever numbers and dashes he had entered must match the above format,
from left to right, for only the charcters he has entered.
For example
9
99
999
999-
999-9
999-99
999-99-
999-99-9
999-99-99
999-99-999
Any of the above should result in a match
Next, he can also put * before or after or before and after any of the
above combination
Ex
*9
*99
*999
*999-
*999-9
*999-99
*999-99-
*999-99-9
*999-99-99
*999-99-999
Or
9*
99*
999*
999-*
999-9*
999-99*
999-99-*
999-99-9*
999-99-99*
999-99-999*
Or
*9*
*99*
*999*
*999-*
*999-9*
*999-99*
*999-99-*
*999-99-9*
*999-99-99*
*999-99-999*
Any help is much appreciated.
Pattern: 999-99-999
Where 9 is any number from 0 to 9
However the user need not enter ALL the digits and dashes as given in
the format.
Whatever numbers and dashes he had entered must match the above format,
from left to right, for only the charcters he has entered.
For example
9
99
999
999-
999-9
999-99
999-99-
999-99-9
999-99-99
999-99-999
Any of the above should result in a match
Next, he can also put * before or after or before and after any of the
above combination
Ex
*9
*99
*999
*999-
*999-9
*999-99
*999-99-
*999-99-9
*999-99-99
*999-99-999
Or
9*
99*
999*
999-*
999-9*
999-99*
999-99-*
999-99-9*
999-99-99*
999-99-999*
Or
*9*
*99*
*999*
*999-*
*999-9*
*999-99*
*999-99-*
*999-99-9*
*999-99-99*
*999-99-999*
Any help is much appreciated.
Reply »
From: (e-mail address removed) - view profile
Date: Thurs, Oct 5 2006 6:52 pm
Email: (e-mail address removed)
Groups: microsoft.public.dotnet.languages.csharp
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author
Is it possible to write a regular expression for this ?
Pattern: 999-99-999
Where 9 is any number from 0 to 9
However the user need not enter ALL the digits and dashes as given in
the format.
Whatever numbers and dashes he had entered must match the above format,
from left to right, for only the charcters he has entered.
For example
9
99
999
999-
999-9
999-99
999-99-
999-99-9
999-99-99
999-99-999
Any of the above should result in a match
Next, he can also put * before or after or before and after any of the
above combination
Ex
*9
*99
*999
*999-
*999-9
*999-99
*999-99-
*999-99-9
*999-99-99
*999-99-999
Or
9*
99*
999*
999-*
999-9*
999-99*
999-99-*
999-99-9*
999-99-99*
999-99-999*
Or
*9*
*99*
*999*
*999-*
*999-9*
*999-99*
*999-99-*
*999-99-9*
*999-99-99*
*999-99-999*
Any help is much appreciated.