Tony Tony -5 years ago 149 Question regex - capture text between comms

I am trying to extract the first three columns from these two lines of text.

A,Frequency,1.005 kHz,1.005 kHz,1.005 kHz,1.005 kHz,94.75 mHz,20,WholeTrace,
A,True RMS,1.404 V,1.403 V,1.404 V,1.403 V,232.6 æV,20,WholeTrace,

So what I would like displayed (extracted) form the above string is:

1.005 kHz
1.404 V

I found this post Regex exclusive capture between strings (VB.NET)

Which is seemingly doing something very similar, so I tried to modify that regex, however I am failing dismally (not least of all because I am really struggling to understand regular expressions!).

For mine, I tried


But that doesn't work.

Could someone kindly help please?

This is in (VS 2013)

Answer Source

Using a Split function:

Dim value As String = Split("A,Frequency,1.005 kHz,1.005 kHz,1.005 kHz,1.005 kHz,94.75 mHz,20,WholeTrace,", ",")(2)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download