Click here to Skip to main content
15,920,513 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Question on Directory Pin
Dave Kreskowiak3-Aug-05 6:33
mveDave Kreskowiak3-Aug-05 6:33 
GeneralAccess... Pin
vtalau2-Aug-05 17:29
vtalau2-Aug-05 17:29 
GeneralRe: Access... Pin
Christian Graus2-Aug-05 18:20
protectorChristian Graus2-Aug-05 18:20 
GeneralOperation New() :: Plase help me Pin
TooLeeDiN2-Aug-05 17:20
TooLeeDiN2-Aug-05 17:20 
GeneralRe: Operation New() :: Plase help me Pin
Christian Graus2-Aug-05 18:01
protectorChristian Graus2-Aug-05 18:01 
GeneralParsing Comma Delimited data in txt file Pin
MeterMan2-Aug-05 16:47
MeterMan2-Aug-05 16:47 
GeneralRe: Parsing Comma Delimited data in txt file Pin
Christian Graus2-Aug-05 16:59
protectorChristian Graus2-Aug-05 16:59 
GeneralRe: Parsing Comma Delimited data in txt file Pin
MeterMan7-Aug-05 19:07
MeterMan7-Aug-05 19:07 
<br />
<br />
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
        Dim oFileDlg As New OpenFileDialog<br />
        Dim Somestuff As String<br />
        If oFileDlg.ShowDialog() = DialogResult.OK Then<br />
            Dim sr As New System.IO.StreamReader(oFileDlg.FileName)<br />
            Dim mystring As String<br />
<br />
            mystring = sr.ReadToEnd()<br />
            Dim objMatches As MatchCollection ' a collection of the matches<br />
            Dim objReg As Regex<br />
            Dim objMatch As Match<br />
<br />
<br />
<br />
            objMatches = objReg.Matches(mystring, "/(0\d-\d\d\d\d-\d\d.{5})(.{29})(.{6})(.{9})(.+)\s+SERVICES:  ==METERED==\s+.+LAST READING\s(.*)\s+==NON METERED==\s.+---TYPE---\s(.*)/Um")<br />
<br />
<br />
<br />
<br />
<br />
<br />
            Dim I As Integer<br />
            For I = 0 To objMatches.Count - 1<br />
                Somestuff += objMatches(I).Value<br />
<br />
<br />
<br />
            Next I<br />
<br />
            sr.Close()<br />
        End If<br />
        TextBox1.Text = Somestuff<br />
    End Sub<br />
End Class<br />


Can you take a look at thisi code please and tell me why the heck TexBox1 always contains " " ?

here is a sample of the text file i'm reading in.

<br />
---ACCOUNT---- ------------NAME------------ CLASS -STATUS- -SERVICE / MAILING ADDRESS--<br />
------------------------------------------------------------------------------------------------------------------------------------<br />
01-0005-00     PHILLIPS & LUCKEY             COM  ACTIVE   102 Blah<br />
                                                            PO BOX 1417  Blah, TX 765671417, B009<br />
<br />
SERVICES:  ==METERED==<br />
           -SERVICE CODE-  TBL  ACT  ----DESCRIPTION----      SCALE  DIALS    UNITS    METER NO#  LAST READ DATE  LAST READING<br />
            10-WATER       5     Y   COMMERCIAL               1.000    7       1.00    56914331         6/05              0<br />
 <br />
           ==NON METERED==<br />
           -SERVICE CODE-  TBL  ACT  ----DESCRIPTION-----       STEP/QUAN   ---AMOUNT---      ---TYPE---<br />


I'm eithter real close to getting this resolved or way way way out in left field Frown | :(
thanks for the help

Win32newb
"Programming is like sex, make one mistake and you have to support it for a long time"
GeneralRe: Parsing Comma Delimited data in txt file Pin
Christian Graus7-Aug-05 19:13
protectorChristian Graus7-Aug-05 19:13 
GeneralRe: Parsing Comma Delimited data in txt file Pin
MeterMan7-Aug-05 19:25
MeterMan7-Aug-05 19:25 
GeneralRe: Parsing Comma Delimited data in txt file Pin
Christian Graus8-Aug-05 13:07
protectorChristian Graus8-Aug-05 13:07 
GeneralRe: Parsing Comma Delimited data in txt file Pin
MeterMan8-Aug-05 13:13
MeterMan8-Aug-05 13:13 
GeneralRe: Parsing Comma Delimited data in txt file Pin
Christian Graus8-Aug-05 13:18
protectorChristian Graus8-Aug-05 13:18 
GeneralRe: Parsing Comma Delimited data in txt file Pin
MeterMan8-Aug-05 15:26
MeterMan8-Aug-05 15:26 
GeneralRe: Parsing Comma Delimited data in txt file Pin
Christian Graus8-Aug-05 17:15
protectorChristian Graus8-Aug-05 17:15 
GeneralRe: Parsing Comma Delimited data in txt file Pin
Scott Serl2-Aug-05 21:29
Scott Serl2-Aug-05 21:29 
GeneralRe: Parsing Comma Delimited data in txt file Pin
MeterMan3-Aug-05 6:02
MeterMan3-Aug-05 6:02 
GeneralAccess...pass a value from one form to another form Pin
vtalau2-Aug-05 16:27
vtalau2-Aug-05 16:27 
GeneralRe: Access...pass a value from one form to another form Pin
RichardBerry3-Aug-05 0:36
RichardBerry3-Aug-05 0:36 
GeneralSet Date and Time on Terminal Pin
gilbertors2-Aug-05 15:17
gilbertors2-Aug-05 15:17 
GeneralWindows Registry Check Pin
andyr20052-Aug-05 11:04
andyr20052-Aug-05 11:04 
GeneralRe: Windows Registry Check Pin
Christian Graus2-Aug-05 14:43
protectorChristian Graus2-Aug-05 14:43 
GeneralRe: Windows Registry Check Pin
andyr20053-Aug-05 1:58
andyr20053-Aug-05 1:58 
GeneralRe: Windows Registry Check Pin
Christian Graus3-Aug-05 13:09
protectorChristian Graus3-Aug-05 13:09 
GeneralRe: Windows Registry Check Pin
andyr20053-Aug-05 13:15
andyr20053-Aug-05 13:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.