You can try Ctrl + W but it still includes all the rests in between the notes.
Since you're changing all notes into the same lyric, is there a problem without having to select only the notes? Are all the rests in a lower-case R making inserting lyrics replace the rests' lyric too? If that's the case, open the UST in Notepad, go to Edit --> Replace, put "Lyric=r" for the first field and "Lyric=R" for the second field, click on "Replace All" then save the file. Rests won't have their lyric changed anymore through inserting lyrics.