The thing is that "hello"you" should not match because it has a " in the middle, which is what [^"] is taking care of. Forget, for now, about the surrounding double-quotes. I know I'm right, because if you use lets say /^"([^x]*)"$/ than "extra" won't match, but "estra" will. :-/