Yakisoba
03-01-2005, 09:12 AM
Ive completed many online tutorials regarding regexp, but I cant seem to construct anything to deal with the following situation.
The format of Login IDs is ######### (or ##a######) but, depending on the type of user a login may be entered 4 different ways.
Login ID type 1 = ##a###### (in this case nothing needs to be done)
Login ID type 2 = a##a###### (in this case the first character needs to be ignored)
Login ID type 3 = ##a######a (in this case the last character needs to be ignored)
Login ID type 4 = a##a######a (in this case the first and the last character need to be ignored)
(in general login IDs will never begin or end with a letter and are 9 characters long)
without using "if" statements is it possible to create a single regular expression that will match the 9 character login ID?
Any help regarding this matter would be greatly appreciated.
Thanks.
The format of Login IDs is ######### (or ##a######) but, depending on the type of user a login may be entered 4 different ways.
Login ID type 1 = ##a###### (in this case nothing needs to be done)
Login ID type 2 = a##a###### (in this case the first character needs to be ignored)
Login ID type 3 = ##a######a (in this case the last character needs to be ignored)
Login ID type 4 = a##a######a (in this case the first and the last character need to be ignored)
(in general login IDs will never begin or end with a letter and are 9 characters long)
without using "if" statements is it possible to create a single regular expression that will match the 9 character login ID?
Any help regarding this matter would be greatly appreciated.
Thanks.