954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Perl Regex to VB Regex VS 2008

Can anyone help me translate this regex match in Perl to a VB.Net Regex match? Heres the perl regex:
if ($line =~ /\\([\w\d\s\-]+?\.\w{3})\"\t\"/) { print "LINE: $1\n" } # regex match
And heres what I have for the VB regex, but its currently not working:

Dim fs As New IO.FileStream(openFileDialog1.FileName, IO.FileMode.Open)
                Dim sr As New IO.StreamReader(fs)

                Dim x() As String = sr.ReadToEnd().Split(CType(vbTab, Char))
                notebox.Text = x(1)
                While J < x.Length
                    ' Dim myMatch As System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(x(J), "\\([\w\d\s\-]+?\.\w{3})\""\t\""")
                    If myRegex.IsMatch(x(J)) = True Then
                        Table1TableAdapter.Insert("Path", x(J), "Type", "FileSize")
                    End If
                    J = J + 1
                End While
                Table1TableAdapter.Update(TestdbDataSet.Table1)
            Catch ex As Exception
                System.Windows.Forms.MessageBox.Show(ex.Message)
            End Try
cellus205
Junior Poster in Training
57 posts since May 2007
Reputation Points: 10
Solved Threads: 3
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You