diff options
author | Louis Pilfold <louis@lpil.uk> | 2021-08-27 00:28:27 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-08-27 00:37:15 +0100 |
commit | 8271e3de88c369a335489e9d1b31d205ffa0031e (patch) | |
tree | 0c6e4252a9d677bb0b53259bff6fe5dfafe1a1ce | |
parent | 6104a3bcc26a05942b8062ae62a0c7b932ca8cf6 (diff) | |
download | gleam_stdlib-8271e3de88c369a335489e9d1b31d205ffa0031e.tar.gz gleam_stdlib-8271e3de88c369a335489e9d1b31d205ffa0031e.zip |
Regex Erlang fix
-rw-r--r-- | src/gleam_stdlib.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl index fdb116b..408853a 100644 --- a/src/gleam_stdlib.erl +++ b/src/gleam_stdlib.erl @@ -10,7 +10,7 @@ decode_tuple4/1, decode_tuple5/1, decode_tuple6/1, decode_map/1, bit_string_int_to_u32/1, bit_string_int_from_u32/1, decode_result/1, bit_string_slice/3, decode_bit_string/1, compile_regex/2, - regex_match/2, regex_split/2, regex_scan/2, base_decode64/1, + regex_check/2, regex_split/2, regex_scan/2, base_decode64/1, wrap_list/1, bit_string_concat/1]). should_equal(Actual, Expected) -> @@ -218,8 +218,8 @@ regex_submatches(String, {S, L}) -> end. regex_matches(String, [{S, L} | Submatches]) -> - {match, binary:part(String, S, L), S, - lists:map(fun(X) -> regex_submatches(String, X) end, Submatches)}. + Submatches1 = lists:map(fun(X) -> regex_submatches(String, X) end, Submatches), + {match, binary:part(String, S, L), Submatches1}. regex_scan(Regex, String) -> case re:run(String, Regex, [global]) of |