/* package whatever; // don't place package name! */

import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String foo1 = "this_is_a_filename";
		String foo2 = "this%is%not%a%filename";
		String foo3 = "%+!?";

		String regex = "[^a-zA-Z0-9æøåÆØÅ_ -]";
		
		Pattern p = Pattern.compile(regex);
		System.out.println("Foo1: " + p.matcher(foo1).find());
		System.out.println("Foo2: " + p.matcher(foo2).find());
		System.out.println("Foo3: " + p.matcher(foo3).find());

	}
}