From 137ca696e13e66af34d45bdb77704e3de0a3d1cd Mon Sep 17 00:00:00 2001 From: Aleksei Magusev <248290+lexmag@users.noreply.github.com> Date: Tue, 12 Dec 2023 03:15:59 -0800 Subject: [PATCH] Improve regex scanning when listing available release files (#66) --- lib/xla.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xla.ex b/lib/xla.ex index 0accf87..683249b 100644 --- a/lib/xla.ex +++ b/lib/xla.ex @@ -233,7 +233,7 @@ defmodule XLA do with {:ok, body} <- get(url) do # We don't have a JSON library available here, so we do # a simple matching - {:ok, Regex.scan(~r/"name":\s+"(.*\.tar\.gz)"/, body) |> Enum.map(&Enum.at(&1, 1))} + {:ok, Regex.scan(~r/"name":\s+"(.*\.tar\.gz)"/, body, capture: :all_but_first) |> List.flatten()} end end