We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See the example, when using regex for validation I would expect .match to match on the whole input, but it returns true even if there is extra input.
.match
Running Zig 0.7.0 and zig-regex from master:
const std = @import("std"); const print = std.debug.print; const Regex = @import("zig-regex/src/regex.zig").Regex; pub fn main() !void { var re1 = try Regex.compile(std.heap.page_allocator, "ab"); print("{}\n", .{try re1.match("ab")}); // true, ok print("{}\n", .{try re1.match("abc")}); // Expected: false, Actual: true var re2 = try Regex.compile(std.heap.page_allocator, "^ab$"); print("{}\n", .{try re2.match("ab")}); // true, ok print("{}\n", .{try re2.match("abc")}); // Expected: false, Actual: true }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
See the example, when using regex for validation I would expect
.match
to match on the whole input, but it returns true even if there is extra input.Running Zig 0.7.0 and zig-regex from master:
The text was updated successfully, but these errors were encountered: