This is my string, which always starts with a alphabet followed by 3 digits, then -
(hyphen), followed by 3 digits, then alphabet, then 4 digits
I123-123S1234N1234
I have come up with a regular expression, which seems to be very long! How can I write a better expression for this?
[a-zA-Z][0-9][0-9][0-9][-][0-9][0-9][0-9][a-zA-Z].........goes on
Note
- Shall support case insensitive
- Hyphen,
S
andN
always constant