With one minor modification, it’ll catch the closing smart tags too: </?st1:.*?>.
I have been a web developer for over twenty years. I completed my MLIS in 2022 and am looking for new opportunities in libraries, government, education, or the publishing industry. You can get in touch here or on LinkedIn.