public function parseText($text, $findMatchingTemplate = false)
    {
        $this->logger->info(sprintf('Parsing: %s', $text));

        $text = $this->prepareText($text);
        $matchedTemplates = $this->getTemplates($text, $findMatchingTemplate);

        foreach ($matchedTemplates as $templatePath => $templateContent) {
            $this->logger->debug(sprintf('Parsing against template: %s', $templatePath));

            $templatePattern = $this->prepareTemplate($templateContent);
            $extractedData = $this->extractData($text, $templatePattern);

            if ($extractedData) {
                $this->logger->info(sprintf('Data extracted: %s', json_encode($extractedData)));

                return $extractedData;
            }
        }

        return null;
    }