i use getmatch function in order to find match of the regular expre. in the resultlink string. I stored the regular expression to the database and use appropriate expressions when needed. The codes work fine for; getmatch(rowslink(ii)("re_pricekdv").ToString which is actually <hemenalkdvdahilfiyat>(\d*\.*\d*.*\d*,\d*). Bu it does not work for rowslink(ii)("re_stokestate").ToString which is actually UrunBilgisiStokDurumDegerTd\"">: (\b\w*\b)
ı guess it is because of the " character inside the string but i could not find any solution for the issue?
objCommand.Parameters("@pricekdv").Value = getmatch(rowslink(ii)("re_pricekdv").ToString, resultslink)
objCommand.Parameters(
"@stock_state").Value = getmatch(rowslink(ii)("re_stokestate").ToString, resultslink)
Function
Function
getmatch(ByVal re_expression As String, ByVal re_text As String) As String
Dim Regex As System.Text.RegularExpressions.Regex
Regex =
New System.Text.RegularExpressions.Regex(re_expression, System.Text.RegularExpressions.RegexOptions.Compiled)
Dim match As Match = Regex.Match(re_text, re_expression)
getmatch = match.Groups(1).Value()
End Function