<commit_before>class Re2 < Formula
  desc "Alternative to backtracking PCRE-style regular expression engines"
  homepage "https://github.com/google/re2"
  url "https://github.com/google/re2/archive/2022-04-01.tar.gz"
  version "20220401"
  sha256 "1ae8ccfdb1066a731bba6ee0881baad5efd2cd661acd9569b689f2586e1a50e9"
  license "BSD-3-Clause"
  head "https://github.com/google/re2.git", branch: "main"

  # The `strategy` block below is used to massage upstream tags into the
  # YYYYMMDD format used in the `version`. This is necessary for livecheck
  # to be able to do proper `Version` comparison.
  livecheck do
    url :stable
    regex(/^(\d{2,4}-\d{2}-\d{2})$/i)
    strategy :git do |tags, regex|
      tags.map { |tag| tag[regex, 1]&.gsub(/\D/, "") }.compact
    end
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "be3a2099f2704a7eea6d34ce1e5cec66c14d326bac15e27a2fdf07bec73f67fa"
    sha256 cellar: :any,                 arm64_big_sur:  "1689eb21538ee19e08e38b0375b6e3652c348481c77f5edd1689b7fcce5b391b"
    sha256 cellar: :any,                 monterey:       "74d3a79c0f3dbce844594c8bbcfa8626f42fd67c41a724c5c8bc90414f57704b"
    sha256 cellar: :any,                 big_sur:        "75e0f519ff35a091f097fbeb1ea6ca4222e661c3c88b94275b6fdcdbc6dff211"
    sha256 cellar: :any,                 catalina:       "cabc0b7793bb1cbdb453e37efe4b31f96507bc9f2c84304d17614845f34fd365"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "b31a2d24c951cca0080b6a8450ebeefe285a1ab2f987da0ab9da91e89e959a6a"
  end

  depends_on "cmake" => :build

  def install
    ENV.cxx11

    # Run this for pkg-config files
    system "make", "common-install", "prefix=#{prefix}"

    # Run this for the rest of the install
    system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", "-DRE2_BUILD_TESTING=OFF", *std_cmake_args<commit_msg>re2: update 20220401 bottle.<commit_after>class Re2 < Formula
  desc "Alternative to backtracking PCRE-style regular expression engines"
  homepage "https://github.com/google/re2"
  url "https://github.com/google/re2/archive/2022-04-01.tar.gz"
  version "20220401"
  sha256 "1ae8ccfdb1066a731bba6ee0881baad5efd2cd661acd9569b689f2586e1a50e9"
  license "BSD-3-Clause"
  head "https://github.com/google/re2.git", branch: "main"

  # The `strategy` block below is used to massage upstream tags into the
  # YYYYMMDD format used in the `version`. This is necessary for livecheck
  # to be able to do proper `Version` comparison.
  livecheck do
    url :stable
    regex(/^(\d{2,4}-\d{2}-\d{2})$/i)
    strategy :git do |tags, regex|
      tags.map { |tag| tag[regex, 1]&.gsub(/\D/, "") }.compact
    end
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "37132b360c414438108478cce8b4a2e0f3f0cda6964a0f2234b43db286c2fd21"
    sha256 cellar: :any,                 arm64_big_sur:  "34486668ba2da5ea41ad6fd8a66af1b43ba1b019597c6b44fe7804da093dc80b"
    sha256 cellar: :any,                 monterey:       "62cd468dafec02c1a1c0d28fd93b93364b5ea67f0fdbdcbb3b91044c9a5bfeec"
    sha256 cellar: :any,                 big_sur:        "eed008dc0f16e4e27c6261a485e2de246129fdf2ee6e66c68377bba5a801c0fc"
    sha256 cellar: :any,                 catalina:       "1de4aeb39e788675d4fed079ce848e18bdcda373034030ae282f74f4776880e6"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "d42453c1a06530cd54dbcc66dd71f8707eb5c06e15f9233abcbf3aeeb4cc321e"
  end

  depends_on "cmake" => :build

  def install
    ENV.cxx11

    # Run this for pkg-config files
    system "make", "common-install", "prefix=#{prefix}"

    # Run this for the rest of the install
    system "cmake", ".", "-DBUILD_SHARED_LIBS=ON", "-DRE2_BUILD_TESTING=OFF", *std_cmake_args
{'fraction_non_alphanumeric': 0.09829867674858223, 'fraction_numerical': 0.17337294085876317, 'mean_word_length': 3.6591194968553458, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '293732', 'n_tokens_mistral': 1835, 'n_tokens_neox': 1503, 'n_words': 270}