I hadn’t actually applied the .replace operator and so am glad for this illustration of its use.
Also this coding illustration reminds me to clarify something from the example I offered above. Auto-correct in this browser turns “straight” quotes, like the ones you see in @PaulWalters’s original example, into curly quotes “like these” – and even like the ones that have been auto-subbed around “Taxi” into the quote above.
So if you copy-and-pasted the query and action in my post, they wouldn’t work because of the curly-quote issue. The proper form, with straight quotes, is:
$Tags.contains("taxi") and $Tags=$Tags-"taxi"
An outlier point, but if something weren’t working this could be a clue.