Reputation: 1978
im looking for a expression with regex the string has such pattern first 4 digits are numbers starting with one "0", then followed by "w000 or n000 or wd00 or nd00" then 7 digits of any char including [a-z][0-9]
many thanks
Upvotes: 1
Views: 74
Reputation: 14233
Pretty straightforward:
0[0-9]{3}(w000|n000|wd00|nd00)[a-z0-9]{7}
There are plenty of other ways you can represent this, but this should match the string you described.
Upvotes: 4