<commit_before><?php
namespace Domains\Bot\Middlewares;

use AlgoliaSearch\Client;
use Domains\Message;
use Domains\Middleware\MiddlewareInterface;
use Illuminate\Support\Collection;

/**
 * Class LaravelDocumentationSearcherMiddleware
 */
class LaravelDocumentationSearcherMiddleware implements MiddlewareInterface
{
    /**
     * @param Message $message
     * @return mixed
     */
    public function handle(Message $message)
    {
        if (preg_match('/^(@.*?\s)?(информация|доки|документация|larvel doc)\s+(?:про|по)?\s*(.*?)$/isu', $message->text, $matches)) {<commit_msg>Fix regex<commit_after><?php
namespace Domains\Bot\Middlewares;

use AlgoliaSearch\Client;
use Domains\Message;
use Domains\Middleware\MiddlewareInterface;
use Illuminate\Support\Collection;

/**
 * Class LaravelDocumentationSearcherMiddleware
 */
class LaravelDocumentationSearcherMiddleware implements MiddlewareInterface
{
    /**
     * @param Message $message
     * @return mixed
     */
    public function handle(Message $message)
    {
        $pattern = '/^(@.*)?.*?\s(информация|доки|документация|larvel doc)\s+(?:про|по)?\s*(.*?)$/isu';
        if (preg_match($pattern, $message->text, $matches)) {
{'fraction_non_alphanumeric': 0.14585079631181894, 'fraction_numerical': 0.0, 'mean_word_length': 4.632075471698113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1695221', 'n_tokens_mistral': 368, 'n_tokens_neox': 395, 'n_words': 65}