title: Java car license plate with regex
body: <p>I want to make a regex representation of license plates in my country:</p>
  
  <p>Pattern for example:</p>
  
  <p>[L{L}][NN{N}][LLL]</p>
  
  <p>More examples:</p>
  
  <p>BH 23 MAS</p>
  
  <p>AG 33 TRA</p>
  
  <p>When we have two letters here [L{L}] we cannot have three numbers in the middle,only two</p>
  
  <p>When we have only a letter here [L{L}] we can have only 'B' and we can have two or three numbers in the middle:</p>
  
  <p>B 12 ERT</p>
  
  <p>B 123 ERT</p>
  
  <p>And at the end for every case: with one letter or two letters at beginning we cannot have 'I' or 'O' on the first or last position in the [LLL] from the final of the expression.(B 123 OST-is false 'O' being first and here BC 12 SEI-is false because 'I' is in the last position)</p>
  
  <p>Any ideas how a regex for this would look like?</p>