I have this in my body tag: something();something(); document.thisForm.textBox1.focus();something(); And I want to find a part between the semicolons that ends in focus() and remove the entire value between the semicolons. My Regular Expression looks like this but it is not matching, can anyone help? ";([^.]*).focus()" Thanks.