Use a regex to grab the extension. Something like:
```
\.\w{3,4}$
```