in reply to regex issues with /gc in log analysis...
It looks like the problem is this part of your pattern: .+. This, being greedy, will eat up everything up to the last possible occurrance of the rest of your pattern. You actually shouldn't need either the \G anchor or that .+ part because the /g flag means that each time through the loop it will pick up where it left off after the last match.
Update: Also, you should be able to use plain old \n instead of that funky \x0D?\x0A so long as the log is generated on the same OS you're running the Perl program on. If not, just run dos2unix or unix2dos as appropriate.
|
|---|