diff -r 7a88ac6ba40c -r 3b9ec9c23a37 java/sql-dk/src/info/globalcode/sql/dk/CLIOptions.java --- a/java/sql-dk/src/info/globalcode/sql/dk/CLIOptions.java Thu Dec 26 00:18:03 2013 +0100 +++ b/java/sql-dk/src/info/globalcode/sql/dk/CLIOptions.java Thu Dec 26 00:58:00 2013 +0100 @@ -25,6 +25,8 @@ import java.util.Collection; import java.util.EnumSet; import java.util.List; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; /** * @@ -104,6 +106,11 @@ e.addProblem(new InvalidOptionsException.OptionProblem("Named and numbered parameters can not be used together in one command.")); } + try { + Pattern.compile(namePrefix + "test" + nameSuffix); + } catch (PatternSyntaxException regexException) { + e.addProblem(new InvalidOptionsException.OptionProblem("Ivalid regular expression in name prefix or suffix", regexException)); + } if (e.hasProblems()) { throw e;