ibsekhar has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Regular Express help
by Utilitarian (Vicar) on Sep 30, 2009 at 10:14 UTC
    Please add code tags to your data, this will make it possible to parse ;~)

    What have you tried so far?

Re: Regular Express help
by venkatesan_G02 (Sexton) on Sep 30, 2009 at 11:45 UTC
    I think this is how the server log looks like:
    ----------------------------------------------- Sep 30 15:13:14 server_hostname Messagestring: (1) AUTHENTICATION : User not on agent host (Login:'<ARG_username>'; ARG_User Name:''; Token:'---->'; Group:''; Site:''; Agent Host:'<Client_hostname>'; Server:'<server hostname>'). ------------------------------------------------ ------------------------------------------------ Sep 29 18:34:47 server_hostname Messagestring: (1) AUTHENTICATION : ACCESS DENIED, bad user password (Login:'<ARG_use +rname>'; User Name:'<ARG_Username>'; Token:'UPW000000002'; Group:''; Site:''; Agent Host:'<Client_Hostname>'; Server:'<Server_Hostname>').
    Please check this link out to write readable posts - Writeup Formatting Tips
Re: Regular Express help
by venkatesan_G02 (Sexton) on Sep 30, 2009 at 11:58 UTC
    Try this code:
    $log =~ /AUTHENTICATION\s*:(.*);/; $variable = $1;