I am trying to match the following sample:
ZU2A ZS6D-9 ZT0ER-7 ZR6PJH-12
It is a combination of letters and numbers (alphanumeric). Here is an explanation:
- It will always start with a capital (uppercase) Z
- Followed always by only ONE(1) of R,S,T or U "[R|S|T|U]"
- Followed always by only ONE(1) number "[0-9]"
- Followed always by a minimum of ONE(1) and optionally a maximum of THREE(3) capital (uppercase) letters like this [A-Z]{1,3}
- Optionally followed by "-" and a minimum of ONE(1) and a maximum of TWO(2) numbers
At the moment I have this:
Z[R|S|T|U][0-9][A-Z]{1,}(\-)?([0-9]{1,3})
But that does not seem to catch all the samples.
EDIT: Here is a sample of a complete string:
ZU0D>APT314,ZT1ER,WIDE1,ZS3PJ-2,ZR5STU-12*/V:/021414z2610.07S/02814.02Ek067/019/A=005475!w%<!
Any help would be appreciated.
Thank You
Danny