0

is this a bug or expected? (google Chrome Screenshot)

When I use the hard-coded String, it works, but when I use the same string in a variable, it doesn't.

enter image description here

2
  • show us actual code ....see minimal reproducible example Commented Jul 13, 2016 at 21:33
  • 1
    and please don't posts screenshots of code/errors/... unless they only are graphically. Commented Jul 14, 2016 at 8:36

1 Answer 1

3

The variable contains a string with two backslashes in it, but when you type out the string yourself, you're typing a string with only one backslash in it. (Typing \\ in a quoted string results in one \, since the backslash is an escape character.)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.