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

Reply via email to