CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: RegExp

  1. #1
    Join Date
    May 2005
    Posts
    178

    RegExp

    hi,

    i want to find some pattern ([digits]) in my string so i wrote-
    Code:
    Dim s As String
    s = "i am[8] [1] and [2]"
    Dim reg As New RegExp
    reg.Pattern = "\[\d\]"
    Dim m As Match
    Dim list As MatchCollection
    Set list = reg.Execute(s)
    For Each m In list
     MsgBox (m.Value)
    Next
    but im getting only "[8]" , why im not getting [1] and [2]?

    thanks in advanced.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured