Skip to content

Regex behavior differs across platforms #1537

@copumpkin

Description

@copumpkin

I seem to remember seeing some regex-related changes in 1.12 so this might no longer be an issue, but I want to capture it in case it is. If I fire up nix-repl on 1.11.x on Linux and Darwin and run

builtins.match "^((|\..*)\.sw[a-z]|.*~)$" "foo"

Darwin will complain that error: compiling pattern ‘^((|..*).sw[a-z]|.*~)$’: empty (sub)expression, whereas Linux will return null.

Metadata

Metadata

Assignees

Labels

buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etc
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions