Getting the first part of a string

Hi,i have strings with names like: 01_something_dff.txt 11_ddfsf_dfgh.txt i want to get the part of the string back without the .txt how can i do that?thanks
[206 byte] By [Kimosa] at [2007-11-27 2:56:18]
# 1
Take a look at the String API and what substring and lastindexof do. You can substring the last index of the period.
_helloWorld_a at 2007-7-12 3:33:52 > top of Java-index,Java Essentials,New To Java...
# 2
String fileName = filePath.split("\\.")[0];
CaptainMorgan08a at 2007-7-12 3:33:52 > top of Java-index,Java Essentials,New To Java...
# 3
thanks CaptainMorgan08
Kimosa at 2007-7-12 3:33:52 > top of Java-index,Java Essentials,New To Java...