Thanks Bruce and Nicholas. I can certainly hack something together from
these solutions. Nicholas, your regex is awesome. It's a lot better
than the way I was trying to do this using split(). :-)
- Dave
Nicholas Hastings wrote:
> This should pick up what you want.
>
> /^L (\d+?)\/(\d+?)\/(\d+?) - (\d+?):(\d+?):(\d+?): "(.+?)(?:<.+?>)+"
> (?:say|say_team) "(.+?)".*$/
> $month = $1;
> $day = $2;
> $year = $3;
> $hour = $4;
> $minute = $5;
> $second = $6;
> $playername = $7;
> $message = $8;
>
> David A. Parker wrote:
>> Hello,
>>
>> Does anyone know of a good log parser for L4D? I'm mainly interested in
>> parsing the chat lines and stripping out everything except the date,
>> time, player name, and chat text. I started writing one in Perl, but I
>> soon realized that it's the player name can contain all kinds of
>> characters, so there's no easy way to split the line into fields reliably.
>>
>> Thanks,
>> Dave
>>
>>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlds_linux
>
--
Dave Parker
Utica College
Integrated Information Technology Services
(315) 792-3229
Registered Linux User #408177
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux