Parse Variable Name

If I have variables coming into to flash like this: “filename.html” Is there a way to parse it into just “filename”. filename can be different sizes in letter length, I just basically need to drop the last 5 characters (.html)