in reply to Re: Re: Help - Counting text - Associative Array? (I was Annon Monk)
in thread Help - Counting text - Associative Array?
You ask good questions. Disregard my earlier code because it was using the wrong variable to search with (I think that's correct?)
What I am wanting is to find out how many times the long "exe" strings appear in a file. Then print each result with a name for the string rather than the string itself. Eg:
C:\Program Files\Internet Explorer\IEXPLORE.EXE
in:
3/15/2004,2:29:31 PM,Security,Success Audit,Object Access ,560,SERVER\ +refterm,SERVER,"Object Open: Object Server: Security Object Type: File Object Name: C:\Program Files\Internet Explorer\IEXPLORE.EXE New Handle ID: 548 Operation ID: {0,178005108}
Result:
Name: Explorer Count: 1
It seems I was walking down the wrong path and will have to use regex (which I have not yet read about, in all honesty) to search for the exe string within each line of text. The 'crime', 'crimean' issue is not a problem because there are no variants of the strings I'd be counting. There are MANY paragraphs like the one above in the file to be searched.
If you have any ideas what this code might look like feel free to offer it :-) I will learn as much on my own in the meantime!
Regards,
Sam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re4: Help - Counting text - Associative Array? (I was Annon Monk)
by Hofmator (Curate) on Mar 22, 2004 at 14:16 UTC |