I want to create a regular expression that can match the following values:
BLANK
PCC - a Plate Change Code (A number from 1-15, and an optional letter a-fA-F)
PCC and a comma
PCC and a comma and a space,
PCC and a comma and a space and another PCC
The 2 PCC's can not have the same number in them.
As an example of a test, the following values must show as good as tested by RegexBuilder:
""
"15, 2d"
"1, 2"
"9a, 15a"
"10,"
"10, "
"10, 11a"
The following values must fail:
"," //comma by itself, not OK, PCC required
", " //comma and spoace also not OK
"a, a" //not ok, no numbers
''10a, a" //Not ok, no 2nd PCC number
"1, 1" //Not ok PCC numbers are the same
"1 2" //Not ok, no comma
"1,2" //Not ok, no space
"10a, 10b" //Not ok PCC numbers are the same
## Deliverables
1) Complete and fully-functional regular expression.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
Javascript example must pass all tests, as per scaffolding code (included hereafter)
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). GPL, GNU or any other license is acceptable to the buyer, so long as I can use it silently.
## Platform
Firefox 1.5 on MAC and PC