Log in to view your list of favourite games.
View all games (2,894)
Explore this month's nominated mods
The elegant, powerful, and open-source mod manager
Download and manage all your collections within Vortex
Upgrade your account to unlock all media content
Oh dear! Something has gone wrong!
Try reloading the notifications.
No unread notifications right now
You're up to date
To enjoy the benefits of Nexus Mods, please log in or register a new account
import java.io.IOException;import java.nio.file.Files;import java.nio.file.Paths;import java.util.regex.Matcher;import java.util.regex.Pattern;public class ListAllTextures{ public static void main (String[] args) throws IOException { if (args.length != 2) System.exit(1); final String extension = "." + args[0]; final String filename= args[1]; final Pattern pattern = Pattern.compile("[a-zA-Z_0-9]+" + extension); final Matcher matcher = pattern.matcher(readFile(filename)); while (matcher.find()) System.out.println(matcher.group()); } static String readFile(String filename) throws IOException { String result = new String(Files.readAllBytes(Paths.get(filename))); return result; }}
1 comment
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ListAllTextures
{
public static void main (String[] args) throws IOException
{
if (args.length != 2) System.exit(1);
final String extension = "." + args[0];
final String filename= args[1];
final Pattern pattern = Pattern.compile("[a-zA-Z_0-9]+" + extension);
final Matcher matcher = pattern.matcher(readFile(filename));
while (matcher.find()) System.out.println(matcher.group());
}
static String readFile(String filename) throws IOException
{
String result = new String(Files.readAllBytes(Paths.get(filename)));
return result;
}
}