Closed suntong closed 8 years ago
Confirmed. https://play.golang.org/p/eXZVSit6Bt https://play.golang.org/p/GHg_i0vM4O
Will check why it didn't work for my program. But that's a different story.
First,
`regexp\s+test`
equivalent to
"regexp\\s+test"
Second,run https://play.golang.org/p/Q4CLOOBV5x and output is
{"Width":10,"Height":20,"Color":"regexp\\s+test","Open":false}
I know.
I meant that escaping the \
is the correct answer.
Hiya,
How to put regexp in the config?
Please try your 027-global-option or mine with the following in the config file:
That will give an error:
ERR! invalid character 'w' in string escape code
If I escape the
\
like this:the content would be wrong:
If I use single quote in the config file, will in turn get:
ERR! invalid character '\'' looking for beginning of value