I need to extract a CVE from a text column. The format is CVE-yyyy-xxxxx
.
The year(yyyy
) is variable, and the x
’s will change per CVE - can be 1 to 6 digits. Sometimes the CVE is enclosed in ()
, sometimes followed by :
The column is like:
the vulnerability name (CVE-2019-0215)
the vulnerability name (CVE-2019-0290) extra words
the vulnerability name CVE-2018-23314: blah blah
Expected Output in a new column:
CVE-2019-0215
CVE-2019-0290
CVE 2018-23314