I have different titles and try to extract the models.
The models are mostly one letter and two numbers or one letter, two numbers and one letter.
I would like to consider only words that have no more than 3 or 4 digits.
- BMW 535d Touring F11N
- BMW M550dX Touring F11
- BMW 520d Touring G31
Regex: [A-Za-z]{1}[0-9]{2}
Result:
- F11 => Must be F11N
- M55, F11 => Must be F11
- G31 => correct
How can I prepare the regex so that only words with 4 characters are considered?