I have a small tricky issue about golang regex.
seems \b
boundering option doesn't work
when I put latein chars like this.
I expected that é
should be treated as a regular char..
but it's treated as one of boundering wards.
package main
import (
"fmt"
"regexp"
)
func main() {
r, _ := regexp.Compile(`\b(vis)\b`)
fmt.Println(r.MatchString("re vis e"))
fmt.Println(r.MatchString("revise"))
fmt.Println(r.MatchString("révisé"))
}
result was:
true
false
true
Please give me any suggestion how to deal with r.MatchString("révisé")
as false
?
Thank you