For example, I wanna search and replace all the "\d" (a command defined by myself). But if I type it in the search bar, then all commands containing it pop up, such as "\Di" and "\dot". So how can I search and replace the commands(or words) exclusively?
PS: I'm using Texpad(MacOS) as the editor(following is a screenshot). If it does not support such a exclusive search and replacement, any other recommendation would be appreciated.

\\d[^\w^\\]should match a\dfollowed by anything except a letter, number or backslash. But I don't know if your editor supports regex search. – campa Feb 04 '21 at 12:05