I want to write a regex to evaluate 12 character strings, a sample string is a02016ab-B30, I want to find all strings that have 4 to 6 character as 016 and 10 to 11 character not as B3.
.{3}(061).{3}(?!B3) doesn't exclude string with more than 12 characters? how can I refine it?