markshen2004
Programmer
Hi there
I need write a regular expression with Perl .I have to search according to the conditions.
- 8 characters maximum
- Position 1 (if it exist) -- numeric only
- Position 2 (if it exist) -- alpha-numeric -- "1 - 0; A - R;"
- Position 3 (if it exist) -- alpha-numeric -- "1 - 0; A - Z;"
- Position 4 - 8 (if they exist) -- numeric only
I write it as /[0-9][1-0A-R][1-0A-Z][0-9]{1,5}/. but I do not know why it doesn't work.
Please give me some idea to modify it.
Thanks a lot
I need write a regular expression with Perl .I have to search according to the conditions.
- 8 characters maximum
- Position 1 (if it exist) -- numeric only
- Position 2 (if it exist) -- alpha-numeric -- "1 - 0; A - R;"
- Position 3 (if it exist) -- alpha-numeric -- "1 - 0; A - Z;"
- Position 4 - 8 (if they exist) -- numeric only
I write it as /[0-9][1-0A-R][1-0A-Z][0-9]{1,5}/. but I do not know why it doesn't work.
Please give me some idea to modify it.
Thanks a lot