Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array Help (parse log file)
#1
Hi,

I'm using the below code to try and seperate a list of updates, however the result that I recieve only shows the first line of the update with the date/time, etc. and ends at the line break. I have tried using (?s) at the beginning to include the linebreak, but it then just pulls the whole text as one update. Is there a way I can display the multiple lines on the updates?

Code:
Copy      Help
str html="03/03/2010 08:39:13 Updated by BOND, JAMES[]This is my update.[]Thanks.[][]02/03/2010 12:53:14 Updated by Dr. No[]And this is my update..[][]02/03/2010 12:21:11 Updated by Oddjob[]YAZZAH!"
str pattern="[0-9]{2}\/[0-9]{2}\/[0-9]{4} (.*)"

ARRAY(str) a
findrx(html pattern 0 4 a)

int i
for(i 0 a.len)
    out "updated: %s" a[1 i]

Thanks,

Paul.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)