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

"[]" and "?" don't match non-ascii characters #41

Open
Khvalin opened this issue Apr 5, 2020 · 1 comment
Open

"[]" and "?" don't match non-ascii characters #41

Khvalin opened this issue Apr 5, 2020 · 1 comment

Comments

@Khvalin
Copy link

Khvalin commented Apr 5, 2020

Hello,

Consider the following code fragment. Neither [] nor ? seem to match a single character if it's outside the standard ASCII range.

package main

import "fmt"
import "github.com/gobwas/glob"

func main() {
	fmt.Println(glob.MustCompile("hell[o]").Match("hello"))        // true
	fmt.Println(glob.MustCompile("ångstr[ö]m").Match("ångström"))  // false

	fmt.Println(glob.MustCompile("hell?").Match("hello"))          // true
	fmt.Println(glob.MustCompile("ångstr?m").Match("ångström"))    // false
}

Thank you.

@inliquid
Copy link

I have same issue.

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

No branches or pull requests

2 participants