Results 1 to 3 of 3

Thread: Parsing the string from webtable

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Answers
    1

    Unhappy Parsing the string from webtable

    I get this string from my webtable which is the data from all rows and columns and then I need to break this into chunks to validate each row to make sure if the number is existing in each row.
    each row starts with the date

    string=Browser ("").Page("").Frame("").WebTable("").GetCellData(3,1)


    and the string is-

    Start TimeDialed From (ANI)Dialed To (DNIS)Start TimeDialed From (ANI)Dialed To (DNIS)10/29/2010 11:48:15.6 AM3104771066 8631 10/26/2010 10:41:13.6 PM35096 3104771066 10/25/2010 10:49:36.5 AM4458 9165547650 10/21/2010 10:50:14.3 PM4258988541 8575 10/21/2010 10:12:35.8 PM9407274846 8575"

    How do I do that??


  2. #2
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: Parsing the string from webtable

    str = "Start TimeDialed From (ANI)Dialed To (DNIS)Start TimeDialed From (ANI)Dialed To (DNIS)10/29/2010 11:48:15.6 AM3104771066 8631 10/26/2010 10:41:13.6 PM35096 3104771066 10/25/2010 10:49:36.5 AM4458 9165547650 10/21/2010 10:50:14.3 PM4258988541 8575 10/21/2010 10:12:35.8 PM9407274846 8575"

    Set RegT = New RegExp

    RegT.pattern = "[A|P]M\d{1,}\S\d{1,}"
    RegT.Global=True
    Set IMatches = RegT.Execute(str)
    Msgbox IMatches.count
    For Each I in IMatches

    Msgbox I.Value

    Next


  3. #3
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: Parsing the string from webtable

    Slight Modification:

    str = "Start TimeDialed From (ANI)Dialed To (DNIS)Start TimeDialed From (ANI)Dialed To (DNIS)10/29/2010 11:48:15.6 AM3104771066 8631 10/26/2010 10:41:13.6 PM35096 3104771066 10/25/2010 10:49:36.5 AM4458 9165547650 10/21/2010 10:50:14.3 PM4258988541 8575 10/21/2010 10:12:35.8 PM9407274846 8575"

    Set RegT = New RegExp

    RegT.pattern = "[A|P]M\d{1,}\s\d{1,}"
    RegT.Global=True
    Set IMatches = RegT.Execute(str)
    Msgbox IMatches.count
    For Each I in IMatches

    Msgbox Right(I.Value,len(I.Value)-2)

    Next


  4.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact