aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index 80c3f2c..e1fdbb1 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -205,6 +205,7 @@ regex_check(Regex, String) ->
regex_split(Regex, String) ->
re:split(String, Regex).
+regex_submatches(_, {-1, 0}) -> none;
regex_submatches(String, {Start, Length}) ->
BinarySlice = binary:part(String, {Start, Length}),
case string:is_empty(binary_to_list(BinarySlice)) of