Regular expression to limit the character found to 2 or 3 not more

20 Views Asked by At

I am looking for a regex that only takes out 2 or 3 characters. If there are more chars there should not be a match. See uploaded picture:

Regex and result

I already tried:

/^[A-Z]{2,3}$/
(\b[A-Z]{2,3})
0

There are 0 best solutions below