A very quick one. I needed to determine the last n characters from a URL string which points to a file (not web page) in order to return the file extension. It's quite easy in AS3, so here's the snippet in the hope that someone finds it useful. This code will return all characters after the last dot.

view plain
1var s:String = "http://media.wiley.com/product_data/coverImage300/91/04703811/0470381191.jpg";
2var extension:String = s.substring(s.lastIndexOf(".")+1, s.length);
3trace(extension); // traces: jpg