RegEx replace with caret
===

Why does 

    var a = "1ab";
    a = a.replace(/[^\d][a-z]/g, "");

remove "a" and "b"? I thought that it should remove only "b" because "a" is preceeded by a number which I excluded by [^\d]. 

Who can help me?