请我需要帮助来完成以下任务:
我在数组中有许多如下文件:
jack+0.txt
jack+2.txt
jack+4.txt
tim+0.txt
tim+2.txt
tim+4.txt
raph+0.txt
raph+2.txt
raph+4.txt
wells+0.txt
wells+2.txt
wells+4.txt
etc.
我想编写一个程序来执行以下操作:
if the filename is like *0.txt, a++;
if the filename is like *2.txt, b++;
if the filename is like *4.txt, c++;
需要的核心帮助是使用正则表达式(在 Java 中)。