the backslash character means something within double quotes. either
escape it ("\S" becomes "\\S") or use backquotes (`\S`)

On Thu, Mar 22, 2018 at 4:33 PM, Tong Sun <[email protected]> wrote:
> I'm trying with simple Perl character class regular expression, which should
> be supported by Go (link).
>
> However, I'm getting "unknown escape sequence" errors.
> I'm wondering why, and how to make it works.
>
> The code is at,
> https://play.golang.org/p/Owjs8wJFM1d
> (was: https://play.golang.org/p/vpRzXOqYAa9)
>
> and I found that `\w` or `\S` Perl character class are not supported.
>
> please help
>
> $ go version
> go version go1.8.3 linux/amd64
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to