You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing a solution that requires me to use a regexp to remove some special chars from a string.
The string is supposed to be normalized before the removal happens.
I was able to reproduce it in playground.
What did you expect to see?
My regexp operation is supposed to replace all characters that are not an Unicode letter, number, dash, underline or space with an empty string, like Bákè123 -_.
What did you see instead?
ReplaceAllString is also replacing my letters with accents with the same letters without accents, so I see Bake123 -_.
The text was updated successfully, but these errors were encountered:
The regexp package always works in terms of UTF-8 encoded code points. It doesn't work in terms of normalized strings. It doesn't support the kind of operation that you need. Sorry.
Uh oh!
There was an error while loading. Please reload this page.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm implementing a solution that requires me to use a regexp to remove some special chars from a string.
The string is supposed to be normalized before the removal happens.
I was able to reproduce it in playground.
What did you expect to see?
My regexp operation is supposed to replace all characters that are not an Unicode letter, number, dash, underline or space with an empty string, like
Bákè123 -_
.What did you see instead?
ReplaceAllString
is also replacing my letters with accents with the same letters without accents, so I seeBake123 -_
.The text was updated successfully, but these errors were encountered: