On Windows, AutoHotkey has all the tools you need for this. The built-in `Clipboard` variable contains only the textual data, and the `OnClipboardChange` event allows you to watch the clipboard for changes. You could then use regular expressions to remove unwanted characters and formatting.