Sep 22, 2005 #1 jliz2803 IS-IT--Management Mar 21, 2005 45 CA I am trying to count the number of "\" in my streamreader.readline how would I go about doing this?
Sep 22, 2005 Thread starter #2 jliz2803 IS-IT--Management Mar 21, 2005 45 CA this is what I have so far If txtreadfile.Text = "\" Then CountSlashes += 1 End If Upvote 0 Downvote
Sep 22, 2005 #3 ThatRickGuy Programmer Oct 12, 2001 3,841 US You could try something like this: Code: txtreadfile.Text.Split("\").Length() -Rick VB.Net Forum forum796 forum855 ASP.NET Forum I believe in killer coding ninja monkeys. Upvote 0 Downvote
You could try something like this: Code: txtreadfile.Text.Split("\").Length() -Rick VB.Net Forum forum796 forum855 ASP.NET Forum I believe in killer coding ninja monkeys.
Sep 23, 2005 #4 vladk Programmer May 1, 2001 991 US Or like this: Dim objRegEx As System.Text.RegularExpressions.Regex Dim intCount As Integer intCount = objRegEx.Matches("My \\d o \g is sick\\\\\\", "[\\]").Count objRegEx= nothing vladk Upvote 0 Downvote
Or like this: Dim objRegEx As System.Text.RegularExpressions.Regex Dim intCount As Integer intCount = objRegEx.Matches("My \\d o \g is sick\\\\\\", "[\\]").Count objRegEx= nothing vladk