Template:Delink

Usage
This template returns the string inside a link preceded by [ or |; or the original string preceded by X or the specified "nolink" character(s), if not a link.