Skip to content
New issue

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

Support matches for bytes #685

Open
amikai opened this issue Jul 12, 2024 · 1 comment
Open

Support matches for bytes #685

amikai opened this issue Jul 12, 2024 · 1 comment
Labels

Comments

@amikai
Copy link

amikai commented Jul 12, 2024

The matches operation currently only supports string types and uses regexp.MatchString under the hood. Is it possible to support regexp.Match when the left variable is a byte slice?

Currently, the string matches operation can support:

"123" matches "123"
a matches b
a matches "123"
"123" matches b

After adding support for byte slices, it should support the following scenarios (expr does not have a byte slice type):

a matches "123" (a is a byte slice in Go)
@antonmedv
Copy link
Member

This is a good idea. Let's add support for []byte as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants