Wikilinks extractor

This tool extracts wikilinks from raw wikitext or templates, for adding to Wikipedia watchlists using the Watchlist raw editor. It unpipes piped links, but does not trace redirects. Written entirely by Wikipedia editor wctaiwan, September 9, 2011, from a suggestion by Lexein. Source code is available at pastebin, released into the public domain.
Instructions: paste wikitext into the window, and click "Submit Query". Select, copy and paste the results into the Raw watchlist editor and Save Watchlist.