# File cron/lib/symbiosis/crontab.rb, line 258
    def self.parse(str)
      if str =~ /\A(?:@(?:#{SHORTCUTS.keys.join("|")})\s+|(?:\S+\s+){5})(.*)\Z$/

        # pick off the last match
        command = $+

        # replace any shortcuts
        SHORTCUTS.collect{|shortcut, snippet| str.sub!(/\A\s*@#{shortcut}/, snippet)}

        min, hour, mday, mon, wday = str.split(/\s+/).first(5)
       
        # This regexp makes sure we start at a word boundary (\b), and can take
        # names longer than the ones specified. 
        wday = wday.downcase.gsub(/\b(#{WDAY.join("|")})[a-z]*/){
          WDAY.index($1)
        }
 
        # Same as above, but have to add one, as months start at 1 not 0.
        mon = mon.downcase.gsub(/\b(#{MON.join("|")})[a-z]*/){
          MON.index($1)+1
        }

        self.new(min, hour, mday, mon, wday, command)
      else
        raise CrontabFormatError, "Badly formatted line: #{str.inspect}"
      end
    end