I actually already had a macro which will do this:
For more information, see the wiki Searching the Forum for Answers section.