<commit_before>﻿using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using Consolas.Core;
using Samples.Grep.Args;

namespace Samples.Grep.Commands
{
    public class GrepCommand
    {
        private readonly IConsole _console;

        public GrepCommand(IConsole console)
        {
            _console = console;
        }

        public string Execute(GrepArgs args)
        {
            var buffer = new StringBuilder();
            foreach (var line in File.ReadAllLines(args.FileName))
            {
                if (Regex.IsMatch(line, args.Regex))
                {
                    buffer.AppendLine(line);
                }
            }<commit_msg>Removed unused field<commit_after>﻿using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using Consolas.Core;
using Samples.Grep.Args;

namespace Samples.Grep.Commands
{
    public class GrepCommand
    {
        public string Execute(GrepArgs args)
        {
            var buffer = new StringBuilder();
            foreach (var line in File.ReadAllLines(args.FileName))
            {
                if (Regex.IsMatch(line, args.Regex))
                {
                    buffer.AppendLine(line);
                }
            }
{'fraction_non_alphanumeric': 0.08279742765273312, 'fraction_numerical': 0.0, 'mean_word_length': 1.7728285077951003, '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': '524305', 'n_tokens_mistral': 339, 'n_tokens_neox': 323, 'n_words': 75}