Regular Expressions

I have a directory that contains files such as:

12345.log.1

45789.log.10

95214.log.120

etc....

I have tried to come up with a regular expression that will find files of this type but have come up empty handed. Anyone have any idea how to construct such an expression. Basically I need a filter such as *.log*

I'm using it in a FileNameFilter to return name.matches(*.log*)

[416 byte] By [RDToola] at [2007-11-27 6:53:25]
# 1
name.matches(".+\\.log\\..+");will match anything that has .log. in the middle with at least one character before and at least one after.
jverda at 2007-7-12 18:28:10 > top of Java-index,Java Essentials,New To Java...
# 2

File directory = new File(".");

File[] files = directory.listFiles(new FileFilter() {

public boolean accept(File file) {

return file.getName().matches(".*\\.log\\..*");

}

});

Edit:

Yes, or the '+' sign as jverd suggested (* means zero or more, + means one or more and the . (dot) means any character).

prometheuzza at 2007-7-12 18:28:10 > top of Java-index,Java Essentials,New To Java...
# 3
http://www.sdnshare.com/view.jsp?id=542
TuringPesta at 2007-7-12 18:28:10 > top of Java-index,Java Essentials,New To Java...
# 4
> http://www.sdnshare.com/view.jsp?id=542A thumbs up from me!; )Although I already have the Regex Coach...
prometheuzza at 2007-7-12 18:28:10 > top of Java-index,Java Essentials,New To Java...
# 5
[ edit: i retract that. thats the only one ]id appreciate comments on that site. especially from people who vote stuff down.
TuringPesta at 2007-7-12 18:28:10 > top of Java-index,Java Essentials,New To Java...
# 6
Thanks for the help. That worked perfectly.
RDToola at 2007-7-12 18:28:10 > top of Java-index,Java Essentials,New To Java...