var str = "xxx.abc.xyz.gif";
var patt = /\..+$/i;
var result = patt.exec(str);

What I am trying to do is to match and catch the END characters after the last ".", such as "gif".

Example:
var str = "aaaa.bbbb.cccc.tiff";

I want to match and catch the "tiff" only so that the result will return "tiff".

How should I write the pattern expression?