# File lib/Getopt/Declare2.rb, line 252
      def matcher(g)
        trailing = g ? '(?!'+Regexp::quote(g)+')' : ''

        # Find type in list of standard (and user) types
        stdtype = stdtype(@type)

        # Handle stdtypes that are specified as regex in parameter
        if (!stdtype && @type =~ %r"\A:/([^/]+)/\Z" )
          stdtype = "#$1"
        end

        if stdtype.nil?
          raise "Error: bad type in Getopt::Declare parameter variable specification near '<#{@name}#{@type}>'\nValid types are:\n" + @@stdtype.keys.inspect
        end

        stdtype = stdtype.dup  # make a copy, as we'll change it in place
        stdtype.gsub!(/\%D/,"(?:#{trailing}\\d)")
        stdtype.gsub!(/\%T/,trailing)
        unless ( stdtype.sub!("\%F","") )
          stdtype = Getopt::Declare::Arg::negflagpat + stdtype
        end
        return "(?:#{stdtype})"
      end