How do I filter words from the 'Clipboard' content?

Hi @Gerald_John_Amora1,
Use {clipboard} instead of simply clipboard. The following snippet would work. I used our newly released skill to generate it.

How it works:

  • The inner replaceregex removes “Hi” or “Hi ,” (any spacing, with or without the comma) from the start of the clipboard.
  • The outer replaceregex removes “Thank you,” or “Thanks” (with an optional ,, . or !) from the end.
  • The "i" flag ignores case, so “hi”, “HI” and “thanks” are removed too.
  • \b makes it match “Hi” only as a whole word, so a paragraph that starts with “Hilary…” stays as it is.

{=replaceregex(replaceregex({clipboard}, "^\s*hi\b\s*,?\s*", "", "i"), "\s*(thank you|thanks)\s*[,.!]?\s*$", "", "i")}