How do I make this simple program work for any string?

 How do I make this simple program work for any string?

Below is some code that will delete all CellTags in a notebook where the CellTag is given by the string "temp".

NotebookLocate[{InputNotebook[], "temp"}];
SelectionMove[InputNotebook[], All, Cell];
SetOptions[NotebookSelection[], CellTags -> {}];

However, I want delete every CellTag in the notebook so there are none left at all. I tried replacing "temp" with * but that doesn’t work. Any ideas here?

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange