<commit_before>module Grunt
  module Concerns
    module Matching
      def formatting_regex
        @formatting_regex ||=
          /(?:#{Wheaties::Concerns::Formatting::ANY_FORMATTING}|\s)*/
      end
      
      def assignment_regex
        nick = Wheaties::Connection.nick
        /\A#{formatting_regex}#{nick} *:+ *(.*?) +is +(.*)\Z/i
      end
      
      def command_regex
        return @command_regex if @command_regex
        prefix = Regexp.escape(Grunt.config["prefix"] || ".")
        format = formatting_regex
        @command_regex = /\A#{format}#{prefix}(\S+)\s*(.*)\Z/
      end
    end
  end
end
<commit_msg>Use whitespace character class in regex pattern instead of literal spaces<commit_after>module Grunt
  module Concerns
    module Matching
      def formatting_regex
        @formatting_regex ||=
          /(?:#{Wheaties::Concerns::Formatting::ANY_FORMATTING}|\s)*/
      end
      
      def assignment_regex
        nick = Wheaties::Connection.nick
        /\A#{formatting_regex}#{nick}\s*:+\s*(.*?)\s+is\s+(.*)\Z/i
      end
      
      def command_regex
        return @command_regex if @command_regex
        prefix = Regexp.escape(Grunt.config["prefix"] || ".")
        format = formatting_regex
        @command_regex = /\A#{format}#{prefix}(\S+)\s*(.*)\Z/
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.14393939393939395, 'fraction_numerical': 0.0, 'mean_word_length': 2.3443037974683545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5977190', 'n_tokens_mistral': 428, 'n_tokens_neox': 417, 'n_words': 78}