@@ -0,0 +1,554 @@
+import java.util.Scanner;%0Aimport java.util.regex.Pattern;%0Aimport java.util.regex.PatternSyntaxException;%0A%0Apublic class Solution %7B%0A%0A%09public static void main( String%5B%5D args ) %7B%0A%09%09%0A%09%09Scanner sc = new Scanner( System.in );%0A%09%09int testCases = Integer.parseInt( sc.nextLine() );%0A%09%09%0A%09%09while ( testCases %3E 0 ) %7B%0A%09%09%09String pattern = sc.nextLine();%0A%0A%09%09%09try %7B%0A%09%09%09%09Pattern.compile( pattern );%0A%09%09%09%09System.out.println( %22Valid%22 );%0A%09%09%09%7D%0A%09%09%09catch ( PatternSyntaxException pse ) %7B%0A%09%09%09%09System.out.println( %22Invalid%22 );%0A%09%09%09%7D%0A%09%09%09%0A%09%09%09testCases--;%0A%09%09%7D%0A%09%09%0A%09%09sc.close();%0A%09%09%0A%09%7D%0A%0A%7D%0A

Add day 28 solution