Skip to content

[BUG] This pattern can't compile #37

@KarryCharon

Description

@KarryCharon
const pat: []const u8 =
        \\([A-Z_a-z0-9]*|[,;]*)
    ;
var re = Regex.compile(std.heap.smp_allocator, pat) catch |err| {
    std.debug.print("Error: {}", .{err});
};

Which raise thread 9311569 panic: attempt to unwrap error: EmptyAlternate.
But this pat is ok for python:

import re

regex = re.compile(r"([A-Z_a-z0-9]*|[,;]*)")
# regex == re.compile(r'([A-Z_a-z0-9]*|[,;]*)', re.UNICODE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions