Results 1 to 3 of 3
Thread: Regular Expressions Help
Feb 22, 2010, 22:13 #1
- Join Date
- May 2005
- 0 Post(s)
- 0 Thread(s)
Regular Expressions Help
I am trying to create a regular expression to help me validate a particular string that users will be passing into my application. I thought I had it figured out until I found a few test cases that my expression gave a false positive for. Here are the details:
1. The first six characters will be letters or spaces.
2. The first character must be a letter.
3. If the first six characters are not all letters, then the rest of the six are padded with spaces.
Here are some examples of valid strings:
ABCDEF0123 GHIJK 0123 LMNO 0123 PQR 0123 ST 0123 U 0123
ABCD F0123 GHI JL0123 MN PQR0123 S UVWX0123
Last edited by viper2843; Feb 22, 2010 at 22:13. Reason: messed up the regex.