Yes but if the string is dynamically generated your method will not be very effective. I think a better solution would be to use the CDATA tag.
And absolutely, CDATA is a solution for that scenario.
For the curious, what I blurted out before reading the whole thing:
HTML rules where the script is, of course it would also decide where it ends -- without having to parse the javascript. As for XSS, if you are vulnerable to this one, you are probably vulnerable to other nifty tricks as well.
If you -really- need to use the /script tag, then most people know that the cheap hack is to just: alert("</scr"+"ipt>");