If you want to extract two uppercase letters followed by four digit:
regexp(yourinput, '[A-Z]{2}\d{4}', 'match')
I recommend that you try to learn regular expression. This particular expression is very simple.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!