Please excuse my lack of knowledge about java as I am just a regular user. I use TextExpander and found a JavaScript that can help me edit my reports. This is what I use in TextExpander
// Start with the clipboard content
var result = TextExpander.pasteboardText;
// Replace double ..
result = result.replace(/\".."/g,". ");
// Replace duplicate words
result = result.replace(/\b(\w+)\s+\1\b /g, "$1 ");;
// Replace double spaces
result = result.replace(/ /g, " ");
Is there any way to make Alfred to the same? I know I can create a javascript workflow that can be triggers using a keyboard shortcut but how do I make it work with clipboard content?