(string-match "\\$$" "") => 0 (string-match "\\$$" "abc") => 0 (string-match "\\$$" "abc$") => 0 (string-match "\\$" "") => 0 (string-match "\\$" "abc") => 0 (string-match "\\$" "abc$") => 0 (string-match "a\\$" "ab") => 0 (string-match "a$" "ab") => nil (これは OK)