$text =~ s~((CAN|CVE)\-\d{4}\-\d{4}) ~<a href=\"http://cve.mitre.org/cgi-bin/cvename.cgi?name=$1\">$1</a> ~ixgc; This will match in the form of CAN-XXXX-XXXX and CVE-XXXX-XXXX, where each X is any number. The CAN form will be deprecated starting October 19, 2005, but will remain valid for linking, and should be kept so all earlier references maintain valid.
coded in bugstest. will be active when made live.