I am learning javascript and I am analyzing existing codes.
In my JS reference book, it says to search on a single space use \"\\s\"?
But I have
In addition to normal spaces, \s matches different kinds of white space characters, including tabs (and possibly newline characters, according to configuration). That said, matching with a normal space is certainly valid, especially in your case where it seems you want to match a name, which is normally separated by a normal space.