aboutsummaryrefslogtreecommitdiff
path: root/core/text/regex/regex.odin
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2025-05-24 06:02:50 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2025-05-24 07:42:04 -0400
commit37d6491300269502341d7f5ea455ae089a36ce06 (patch)
treea4333515cb43f2a34e802e36a953de4324272c95 /core/text/regex/regex.odin
parentfedb9efb413dda3f2d9d4bbb39050219f8c0f394 (diff)
Remove `Global` RegEx flag, default to unanchored patterns
Diffstat (limited to 'core/text/regex/regex.odin')
-rw-r--r--core/text/regex/regex.odin4
1 files changed, 0 insertions, 4 deletions
diff --git a/core/text/regex/regex.odin b/core/text/regex/regex.odin
index 90aa34946..94a4b163a 100644
--- a/core/text/regex/regex.odin
+++ b/core/text/regex/regex.odin
@@ -167,7 +167,6 @@ to escape the delimiter if found in the middle of the string.
All runes after the closing delimiter will be parsed as flags:
-- 'g': Global
- 'm': Multiline
- 'i': Case_Insensitive
- 'x': Ignore_Whitespace
@@ -244,7 +243,6 @@ create_by_user :: proc(
// to `end` here.
for r in pattern[start + end:] {
switch r {
- case 'g': flags += { .Global }
case 'm': flags += { .Multiline }
case 'i': flags += { .Case_Insensitive }
case 'x': flags += { .Ignore_Whitespace }
@@ -283,8 +281,6 @@ create_iterator :: proc(
permanent_allocator := context.allocator,
temporary_allocator := context.temp_allocator,
) -> (result: Match_Iterator, err: Error) {
- flags := flags
- flags += {.Global} // We're iterating over a string, so the next match could start anywhere
if .Multiline in flags {
return {}, .Unsupported_Flag