Hi, have you tried fmt.Sscanf? https://play.golang.org/p/Ebr9VcobOcE
On 29.08.2021 21:52, 'nadashin' via golang-nuts wrote: > fmt.Printf has a format specifier, %q that escapes string with Go syntax and > add quotes around the string. ( %#v also does it) But it doesn't have one > that unescapes a string. I couldn't find any stdlib function that escape and > unescape a string following Go syntax. (and doesn't add quotes around the > string) Maybe https://pkg.go.dev/strconv#Unquote [1] is what you want. No, that's not what I am looking for. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/u9PmcdYmEIsTinPPzTNK6e3I1ANlGsvftmP4pKCptQj1Gupoz7wVr2F1BxcrApcL0Anoh-to1xJEkp4z6Y7RRtuNzBgAPEQFRnuYp4JCfSM%3D%40protonmail.com [2]. Links: ------ [1] https://pkg.go.dev/strconv#Unquote [2] https://groups.google.com/d/msgid/golang-nuts/u9PmcdYmEIsTinPPzTNK6e3I1ANlGsvftmP4pKCptQj1Gupoz7wVr2F1BxcrApcL0Anoh-to1xJEkp4z6Y7RRtuNzBgAPEQFRnuYp4JCfSM%3D%40protonmail.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9f2d22b8c8b61ea412ff3a5f39bd62df%40posteo.de.