I think that you need to add the underscore ('_') to the character class in your regex.
Update: I read too quickly. Reading again your regex, no, there is no need to add the underscore, since this character class is aimed at matching the final "java" extension.
In reply to Re^2: extract file name from path
by Laurent_R
in thread extract file name from path
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |