Vittici shared this a long time ago. I'd like to modify it to select forward one word at a time instead of backward one step at a time. I've tried messing with it, but my knowledge of regular expressions is not up to snuff. Is there anyone who loves playing around with workflows and regex that would like to flip this workflow around for me? I imagine if I could follow it, it would be pretty simple to reverse. Alas, I can't. :-)
This is a somewhat tricky workflow... but I think this does what you want:
It's not based on Federico's workflow because selecting backward is more complicated than forward, so there's a bunch of stuff that you don't really need... Brief explanation of how it works:
- First, it extracts the text from the end of the selection to the end of the entire document (leaving the second part of the range empty implicitly uses the end of the document)
- Then, there's the regular expression that finds the next word, including whitespace etc. that comes before it
- The count action simply counts the number of characters that we have to move forward...
- ...which is then used in the final Select Range action with inline math to add it to the end of the current selection.
Saweet! Thanks again Ole!