Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting Characters

Status
Not open for further replies.

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?
 
this is what I have so far

If txtreadfile.Text = "\" Then
CountSlashes += 1
End If
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top