base/common/src/main/com/thesett/common/util/CommandLineParser.java
private void checkArgumentFormat(CommandLineOption optionInfo, CharSequence matchedArg)
    {
        // Check if this option enforces a format for its argument.
        if (optionInfo.argumentFormatRegexp != null)
        {
            Pattern pattern = Pattern.compile(optionInfo.argumentFormatRegexp);
            Matcher argumentMatcher = pattern.matcher(matchedArg);

            // Check if the argument does not meet its required format.
            if (!argumentMatcher.matches())
            {
                // Create an error for this badly formed argument.
                parsingErrors.add("The argument to option " + optionInfo.option +
                    " does not meet its required format.\n");
            }
        }
    }
private void checkArgumentFormat(CommandLineOption optionInfo, CharSequence matchedArg)
    {
        // Check if this option enforces a format for its argument.
        if (optionInfo.argumentFormatRegexp != null)
        {
            Pattern pattern = Pattern.compile(optionInfo.argumentFormatRegexp);
            Matcher argumentMatcher = pattern.matcher(matchedArg);

            // Check if the argument does not meet its required format.
            if (!argumentMatcher.matches())
            {
                // Create an error for this badly formed argument.
                parsingErrors.add("The argument to option " + optionInfo.option +
                    " does not meet its required format.\n");
            }
        }
    }
private void checkArgumentFormat ( CommandLineOption optionInfo , CharSequence matchedArg ) { // Check if this option enforces a format for its argument. if ( optionInfo . argumentFormatRegexp != null ) { Pattern pattern = Pattern . compile ( optionInfo . argumentFormatRegexp ) ; Matcher argumentMatcher = pattern . matcher ( matchedArg ) ; // Check if the argument does not meet its required format. if ( ! argumentMatcher . matches ( ) ) { // Create an error for this badly formed argument. parsingErrors . add ( "The argument to option " + optionInfo . option + " does not meet its required format.\n" ) ; } } }
Checks the format of an argument to an option against its specified regular expression format if one has been
set. Any errors are added to the list of parsing errors.

@param optionInfo The command line option information for the option which is havings its argument checked.
@param matchedArg The string argument to the option.
Checks the format of an argument to an option against its specified regular expression format if one has been set . Any errors are added to the list of parsing errors .