Hi , I need to extract the this pattern of values from the below string -CVE-XXXX-XXXX . How do i achieve it using trim functionlality/ regex? for eg ih the first eg below- I need to extract only CVE-2010-4478

“CVE-2010-4478” 7.5 https://EDDW
"CVE-2016-10708 5.0 https://WEFW
"CVE-2017-15906 5.0 https://SFEWF
"CVE-2018-15473 5.0 https://SDSC
"CVE-2010-4755 4.0 https://SCSRC
“_ CVE-2008-5161 2.6 https://SCC
23/tcp open telnet”

Buddy if this is the string
in_string = “CVE-2010-4478” 7.5 https://EDDW

you can get like
out_string = split(in_string," ")(0).ToString

This would work buddy

1 Like

Use **For Each ** activity and then use the below condition in the in clause.

Regex.Matches(strText, "(CVE-/d{4}-/d+)")

Then use the value inside the foreach as


If have to do in

For Each match As Match In Regex.Matches(data, "(CVE-/d{4}-/d+)")
1 Like

Thanks Palaniyappan, it worked

1 Like

Cheers buddy

Keep going

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.