Hi All,
I am trying to extract 2 values from a string and place them into separate groups.
String:
Values are 1.6919 and 1.6835.Code:1.6919</td> <td class="Normal" align="Right">1.6835</td> <td class="Normal" align="Right">27 Mar 08</td> <td class="Normal" align="Right">6 Monthly</td>
Below is the code I am using:
I have read a whole bunch of regex articles but still can't seem to get it correct.Code:Const myPattern As String = "(?<entryprice>[\d.{1}+[\d.{4}])" & _ ".*?" & _ "(?<entryprice>[\d.{1}+[\d.{4}])" & _ ".*?" For each m As Match In Regex.Matches(mystring, myPattern) Dim EntryPriceE As String = m.groups("entryprice").ToString Dim ExitPriceE As String = m.Groups("exitprice").ToString Next




Reply With Quote