Indd - Find and Perform Function

I was wondering if a script is possible for Indd CS that works similar to a Find/Change. But rather than change the selected item, it would allow the operator to perform a function all “all” the values throughout the document that matched a particular value.

Our scenario works as such:
Our operatrors need to tag many Price Points throughout a particular document. Example: Tag all prices that equal $5 OFF.

It would be nice if a script could be written that displays a dialog box that asks the operator: “Type the value you would liked tagged”.
the operator would then type: $5 OFF.

Could the script then find all those values in the document that matched that value. Now, rather than doing a “Replace” the script would allow the user to perform a function on those values throughout the document.
In our case, we would have to tag the box with a predefined Tag element from the Tags palette.

I realize this is asking for a lot. But just maybe someone knows if this is an impossible dream?