in reply to Link regex

s/\[(.*?)\|(.*?)(?:\|(.*?))?\]/ "<a href=\"$1\"" . ($3 ? " target=\"$3\"" : "") . ">$2<\/a>" /exg;