public void build( OptionBuilder option, String... options )
    {
        for (String opt : options)
        {
            Matcher matcher = Pattern.compile( "(--[^\\s]*)(\\s(.+))?" ).matcher( opt );
            if (matcher.matches())
            {
                option.withLongForm( matcher.group( 1 ) );
                if (!StringUtil.isBlank( matcher.group( 3 ) )) option.wantsArgument( matcher.group( 3 ) );
                continue;
            }

            matcher = Pattern.compile( "(-.)(\\s+(.+))?" ).matcher( opt );
            if (matcher.matches())
            {
                option.withShortForm( matcher.group( 1 ) );
                if (!StringUtil.isBlank( matcher.group( 3 ) )) option.wantsArgument( matcher.group( 3 ) );
                continue;
            }

            option.withDescription( opt );
        }
    }
public void build ( OptionBuilder option , String ... options ) { for ( String opt : options ) { Matcher matcher = Pattern . compile ( "(--[^\\s]*)(\\s(.+))?" ) . matcher ( opt ) ; if ( matcher . matches ( ) ) { option . withLongForm ( matcher . group ( 1 ) ) ; if ( ! StringUtil . isBlank ( matcher . group ( 3 ) ) ) option . wantsArgument ( matcher . group ( 3 ) ) ; continue ; } matcher = Pattern . compile ( "(-.)(\\s+(.+))?" ) . matcher ( opt ) ; if ( matcher . matches ( ) ) { option . withShortForm ( matcher . group ( 1 ) ) ; if ( ! StringUtil . isBlank ( matcher . group ( 3 ) ) ) option . wantsArgument ( matcher . group ( 3 ) ) ; continue ; } option . withDescription ( opt ) ; } }
<p>build.</p>

@param option a {@link com.greenpepper.util.cli.OptionBuilder} object.
@param options a {@link java.lang.String} object.